aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Murdoch <benm@android.com>2016-05-18 10:25:55 +0000
committerBen Murdoch <benm@android.com>2016-05-18 10:25:55 +0000
commitf2e3994fa5148cc3d9946666f0b0596290192b0e (patch)
treec3598742f63815b83f744c50e515b845c1217551 /include
parent8389745919cae02139ddc085a63c00d024269cf2 (diff)
downloadv8-f2e3994fa5148cc3d9946666f0b0596290192b0e.tar.gz
Revert "Upgrade to 5.0.71.48"
This reverts commit 8389745919cae02139ddc085a63c00d024269cf2. Change-Id: Ic5c75c8b3ddaf795972372fbc863a514862953c1
Diffstat (limited to 'include')
-rw-r--r--include/v8-experimental.h1
-rw-r--r--include/v8-platform.h10
-rw-r--r--include/v8-profiler.h134
-rw-r--r--include/v8-version.h8
-rw-r--r--include/v8.h114
5 files changed, 30 insertions, 237 deletions
diff --git a/include/v8-experimental.h b/include/v8-experimental.h
index 3874e911..f988e140 100644
--- a/include/v8-experimental.h
+++ b/include/v8-experimental.h
@@ -39,7 +39,6 @@ class V8_EXPORT FastAccessorBuilder {
LabelId MakeLabel();
void SetLabel(LabelId label_id);
void CheckNotZeroOrJump(ValueId value_id, LabelId label_id);
- ValueId Call(v8::FunctionCallback callback, ValueId value_id);
private:
FastAccessorBuilder() = delete;
diff --git a/include/v8-platform.h b/include/v8-platform.h
index 11f8d51f..4fbef0f5 100644
--- a/include/v8-platform.h
+++ b/include/v8-platform.h
@@ -5,7 +5,6 @@
#ifndef V8_V8_PLATFORM_H_
#define V8_V8_PLATFORM_H_
-#include <stddef.h>
#include <stdint.h>
namespace v8 {
@@ -57,15 +56,6 @@ class Platform {
virtual ~Platform() {}
/**
- * Gets the number of threads that are used to execute background tasks. Is
- * used to estimate the number of tasks a work package should be split into.
- * A return value of 0 means that there are no background threads available.
- * Note that a value of 0 won't prohibit V8 from posting tasks using
- * |CallOnBackgroundThread|.
- */
- virtual size_t NumberOfAvailableBackgroundThreads() { return 0; }
-
- /**
* Schedules a task to be invoked on a background thread. |expected_runtime|
* indicates that the task will run a long time. The Platform implementation
* takes ownership of |task|. There is no guarantee about order of execution
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index 007ae2ec..e4326002 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -207,13 +207,6 @@ class V8_EXPORT CpuProfiler {
CpuProfile* StopProfiling(Local<String> title);
/**
- * Force collection of a sample. Must be called on the VM thread.
- * Recording the forced sample does not contribute to the aggregated
- * profile statistics.
- */
- void CollectSample();
-
- /**
* Tells the profiler whether the embedder is idle.
*/
void SetIdle(bool is_idle);
@@ -426,90 +419,6 @@ class V8_EXPORT ActivityControl { // NOLINT
/**
- * AllocationProfile is a sampled profile of allocations done by the program.
- * This is structured as a call-graph.
- */
-class V8_EXPORT AllocationProfile {
- public:
- struct Allocation {
- /**
- * Size of the sampled allocation object.
- */
- size_t size;
-
- /**
- * The number of objects of such size that were sampled.
- */
- unsigned int count;
- };
-
- /**
- * Represents a node in the call-graph.
- */
- struct Node {
- /**
- * Name of the function. May be empty for anonymous functions or if the
- * script corresponding to this function has been unloaded.
- */
- Local<String> name;
-
- /**
- * Name of the script containing the function. May be empty if the script
- * name is not available, or if the script has been unloaded.
- */
- Local<String> script_name;
-
- /**
- * id of the script where the function is located. May be equal to
- * v8::UnboundScript::kNoScriptId in cases where the script doesn't exist.
- */
- int script_id;
-
- /**
- * Start position of the function in the script.
- */
- int start_position;
-
- /**
- * 1-indexed line number where the function starts. May be
- * kNoLineNumberInfo if no line number information is available.
- */
- int line_number;
-
- /**
- * 1-indexed column number where the function starts. May be
- * kNoColumnNumberInfo if no line number information is available.
- */
- int column_number;
-
- /**
- * List of callees called from this node for which we have sampled
- * allocations. The lifetime of the children is scoped to the containing
- * AllocationProfile.
- */
- std::vector<Node*> children;
-
- /**
- * List of self allocations done by this node in the call-graph.
- */
- std::vector<Allocation> allocations;
- };
-
- /**
- * Returns the root node of the call-graph. The root node corresponds to an
- * empty JS call-stack. The lifetime of the returned Node* is scoped to the
- * containing AllocationProfile.
- */
- virtual Node* GetRootNode() = 0;
-
- virtual ~AllocationProfile() {}
-
- static const int kNoLineNumberInfo = Message::kNoLineNumberInfo;
- static const int kNoColumnNumberInfo = Message::kNoColumnInfo;
-};
-
-
-/**
* Interface for controlling heap profiling. Instance of the
* profiler can be retrieved using v8::Isolate::GetHeapProfiler.
*/
@@ -613,49 +522,6 @@ class V8_EXPORT HeapProfiler {
void StopTrackingHeapObjects();
/**
- * Starts gathering a sampling heap profile. A sampling heap profile is
- * similar to tcmalloc's heap profiler and Go's mprof. It samples object
- * allocations and builds an online 'sampling' heap profile. At any point in
- * time, this profile is expected to be a representative sample of objects
- * currently live in the system. Each sampled allocation includes the stack
- * trace at the time of allocation, which makes this really useful for memory
- * leak detection.
- *
- * This mechanism is intended to be cheap enough that it can be used in
- * production with minimal performance overhead.
- *
- * Allocations are sampled using a randomized Poisson process. On average, one
- * allocation will be sampled every |sample_interval| bytes allocated. The
- * |stack_depth| parameter controls the maximum number of stack frames to be
- * captured on each allocation.
- *
- * NOTE: This is a proof-of-concept at this point. Right now we only sample
- * newspace allocations. Support for paged space allocation (e.g. pre-tenured
- * objects, large objects, code objects, etc.) and native allocations
- * doesn't exist yet, but is anticipated in the future.
- *
- * Objects allocated before the sampling is started will not be included in
- * the profile.
- *
- * Returns false if a sampling heap profiler is already running.
- */
- bool StartSamplingHeapProfiler(uint64_t sample_interval = 512 * 1024,
- int stack_depth = 16);
-
- /**
- * Stops the sampling heap profile and discards the current profile.
- */
- void StopSamplingHeapProfiler();
-
- /**
- * Returns the sampled profile of allocations allocated (and still live) since
- * StartSamplingHeapProfiler was called. The ownership of the pointer is
- * transfered to the caller. Returns nullptr if sampling heap profiler is not
- * active.
- */
- AllocationProfile* GetAllocationProfile();
-
- /**
* Deletes all snapshots taken. All previously returned pointers to
* snapshots and their contents become invalid after this call.
*/
diff --git a/include/v8-version.h b/include/v8-version.h
index f155b8ae..c1231d42 100644
--- a/include/v8-version.h
+++ b/include/v8-version.h
@@ -8,10 +8,10 @@
// These macros define the version number for the current version.
// NOTE these macros are used by some of the tool scripts and the build
// system so their names cannot be changed without changing the scripts.
-#define V8_MAJOR_VERSION 5
-#define V8_MINOR_VERSION 0
-#define V8_BUILD_NUMBER 71
-#define V8_PATCH_LEVEL 48
+#define V8_MAJOR_VERSION 4
+#define V8_MINOR_VERSION 9
+#define V8_BUILD_NUMBER 385
+#define V8_PATCH_LEVEL 28
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/include/v8.h b/include/v8.h
index 9ccbc6eb..d9ad17cc 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -329,7 +329,9 @@ class Local {
friend class PersistentValueMapBase;
template<class F1, class F2> friend class PersistentValueVector;
- explicit V8_INLINE Local(T* that) : val_(that) {}
+ template <class S>
+ V8_INLINE Local(S* that)
+ : val_(that) {}
V8_INLINE static Local<T> New(Isolate* isolate, T* that);
T* val_;
};
@@ -432,10 +434,7 @@ class WeakCallbackInfo {
return internal_fields_[1];
}
- V8_DEPRECATED("Not realiable once SetSecondPassCallback() was used.",
- bool IsFirstPass() const) {
- return callback_ != nullptr;
- }
+ bool IsFirstPass() const { return callback_ != nullptr; }
// When first called, the embedder MUST Reset() the Global which triggered the
// callback. The Global itself is unusable for anything else. No v8 other api
@@ -788,7 +787,7 @@ template <class T, class M> class Persistent : public PersistentBase<T> {
template<class F1, class F2> friend class Persistent;
template<class F> friend class ReturnValue;
- explicit V8_INLINE Persistent(T* that) : PersistentBase<T>(that) {}
+ template <class S> V8_INLINE Persistent(S* that) : PersistentBase<T>(that) { }
V8_INLINE T* operator*() const { return this->val_; }
template<class S, class M2>
V8_INLINE void Copy(const Persistent<S, M2>& that);
@@ -887,7 +886,7 @@ using UniquePersistent = Global<T>;
*/
class V8_EXPORT HandleScope {
public:
- explicit HandleScope(Isolate* isolate);
+ HandleScope(Isolate* isolate);
~HandleScope();
@@ -940,7 +939,7 @@ class V8_EXPORT HandleScope {
*/
class V8_EXPORT EscapableHandleScope : public HandleScope {
public:
- explicit EscapableHandleScope(Isolate* isolate);
+ EscapableHandleScope(Isolate* isolate);
V8_INLINE ~EscapableHandleScope() {}
/**
@@ -2679,10 +2678,10 @@ class V8_EXPORT Object : public Value {
V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
bool ForceSet(Local<Value> key, Local<Value> value,
PropertyAttribute attribs = None));
- V8_DEPRECATE_SOON("Use CreateDataProperty / DefineOwnProperty",
- Maybe<bool> ForceSet(Local<Context> context,
- Local<Value> key, Local<Value> value,
- PropertyAttribute attribs = None));
+ V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
+ Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
+ Local<Value> value,
+ PropertyAttribute attribs = None));
V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
@@ -3148,8 +3147,7 @@ class FunctionCallbackInfo {
public:
V8_INLINE int Length() const;
V8_INLINE Local<Value> operator[](int i) const;
- V8_INLINE V8_DEPRECATED("Use Data() to explicitly pass Callee instead",
- Local<Function> Callee() const);
+ V8_INLINE Local<Function> Callee() const;
V8_INLINE Local<Object> This() const;
V8_INLINE Local<Object> Holder() const;
V8_INLINE bool IsConstructCall() const;
@@ -3193,21 +3191,19 @@ class PropertyCallbackInfo {
V8_INLINE Local<Object> This() const;
V8_INLINE Local<Object> Holder() const;
V8_INLINE ReturnValue<T> GetReturnValue() const;
- V8_INLINE bool ShouldThrowOnError() const;
// This shouldn't be public, but the arm compiler needs it.
- static const int kArgsLength = 7;
+ static const int kArgsLength = 6;
protected:
friend class MacroAssembler;
friend class internal::PropertyCallbackArguments;
friend class internal::CustomArguments<PropertyCallbackInfo>;
- static const int kShouldThrowOnErrorIndex = 0;
- static const int kHolderIndex = 1;
- static const int kIsolateIndex = 2;
- static const int kReturnValueDefaultValueIndex = 3;
- static const int kReturnValueIndex = 4;
- static const int kDataIndex = 5;
- static const int kThisIndex = 6;
+ static const int kHolderIndex = 0;
+ static const int kIsolateIndex = 1;
+ static const int kReturnValueDefaultValueIndex = 2;
+ static const int kReturnValueIndex = 3;
+ static const int kDataIndex = 4;
+ static const int kThisIndex = 5;
V8_INLINE PropertyCallbackInfo(internal::Object** args) : args_(args) {}
internal::Object** args_;
@@ -4326,10 +4322,8 @@ enum AccessType {
* object.
*/
typedef bool (*AccessCheckCallback)(Local<Context> accessing_context,
- Local<Object> accessed_object,
- Local<Value> data);
-typedef bool (*DeprecatedAccessCheckCallback)(Local<Context> accessing_context,
- Local<Object> accessed_object);
+ Local<Object> accessed_object);
+
/**
* Returns true if cross-context access should be allowed to the named
@@ -4759,10 +4753,6 @@ class V8_EXPORT ObjectTemplate : public Template {
*/
void SetAccessCheckCallback(AccessCheckCallback callback,
Local<Value> data = Local<Value>());
- V8_DEPRECATED(
- "Use SetAccessCheckCallback with new AccessCheckCallback signature.",
- void SetAccessCheckCallback(DeprecatedAccessCheckCallback callback,
- Local<Value> data = Local<Value>()));
V8_DEPRECATED(
"Use SetAccessCheckCallback instead",
@@ -5009,10 +4999,8 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space,
AllocationAction action,
int size);
-// --- Enter/Leave Script Callback ---
-typedef void (*BeforeCallEnteredCallback)(Isolate*);
-typedef void (*CallCompletedCallback)(Isolate*);
-typedef void (*DeprecatedCallCompletedCallback)();
+// --- Leave Script Callback ---
+typedef void (*CallCompletedCallback)();
// --- Promise Reject Callback ---
enum PromiseRejectEvent {
@@ -5081,24 +5069,11 @@ enum GCType {
kGCTypeIncrementalMarking | kGCTypeProcessWeakCallbacks
};
-/**
- * GCCallbackFlags is used to notify additional information about the GC
- * callback.
- * - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for
- * constructing retained object infos.
- * - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.
- * - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback
- * is called synchronously without getting posted to an idle task.
- * - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called
- * in a phase where V8 is trying to collect all available garbage
- * (e.g., handling a low memory notification).
- */
enum GCCallbackFlags {
kNoGCCallbackFlags = 0,
kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1,
kGCCallbackFlagForced = 1 << 2,
- kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3,
- kGCCallbackFlagCollectAllAvailableGarbage = 1 << 4,
+ kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3
};
typedef void (*GCCallback)(GCType type, GCCallbackFlags flags);
@@ -5480,18 +5455,6 @@ class V8_EXPORT Isolate {
kPromiseChain = 17,
kPromiseAccept = 18,
kPromiseDefer = 19,
- kHtmlCommentInExternalScript = 20,
- kHtmlComment = 21,
- kSloppyModeBlockScopedFunctionRedefinition = 22,
- kForInInitializer = 23,
- kArrayProtectorDirtied = 24,
- kArraySpeciesModified = 25,
- kArrayPrototypeConstructorModified = 26,
- kArrayInstanceProtoModified = 27,
- kArrayInstanceConstructorModified = 28,
-
- // If you add new values here, you'll also need to update V8Initializer.cpp
- // in Chromium.
kUseCounterFeatureCount // This enum value must be last.
};
@@ -5833,19 +5796,6 @@ class V8_EXPORT Isolate {
void SetEventLogger(LogEventCallback that);
/**
- * Adds a callback to notify the host application right before a script
- * is about to run. If a script re-enters the runtime during executing, the
- * BeforeCallEnteredCallback is invoked for each re-entrance.
- * Executing scripts inside the callback will re-trigger the callback.
- */
- void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback);
-
- /**
- * Removes callback that was installed by AddBeforeCallEnteredCallback.
- */
- void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback);
-
- /**
* Adds a callback to notify the host application when a script finished
* running. If a script re-enters the runtime during executing, the
* CallCompletedCallback is only invoked when the outer-most script
@@ -5853,18 +5803,12 @@ class V8_EXPORT Isolate {
* further callbacks.
*/
void AddCallCompletedCallback(CallCompletedCallback callback);
- V8_DEPRECATE_SOON(
- "Use callback with parameter",
- void AddCallCompletedCallback(DeprecatedCallCompletedCallback callback));
/**
* Removes callback that was installed by AddCallCompletedCallback.
*/
void RemoveCallCompletedCallback(CallCompletedCallback callback);
- V8_DEPRECATE_SOON(
- "Use callback with parameter",
- void RemoveCallCompletedCallback(
- DeprecatedCallCompletedCallback callback));
+
/**
* Set callback to notify about promise reject with no handler, or
@@ -7188,7 +7132,7 @@ class Internals {
static const int kNodeIsPartiallyDependentShift = 4;
static const int kNodeIsActiveShift = 4;
- static const int kJSObjectType = 0xb5;
+ static const int kJSObjectType = 0xb7;
static const int kFirstNonstringType = 0x80;
static const int kOddballType = 0x83;
static const int kForeignType = 0x87;
@@ -8318,12 +8262,6 @@ ReturnValue<T> PropertyCallbackInfo<T>::GetReturnValue() const {
return ReturnValue<T>(&args_[kReturnValueIndex]);
}
-template <typename T>
-bool PropertyCallbackInfo<T>::ShouldThrowOnError() const {
- typedef internal::Internals I;
- return args_[kShouldThrowOnErrorIndex] != I::IntToSmi(0);
-}
-
Local<Primitive> Undefined(Isolate* isolate) {
typedef internal::Object* S;