Commit f022e53b authored by jochen's avatar jochen Committed by Commit bot

Make v8::Handle as "deprecated soon"

BUG=v8:4131
R=bmeurer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1224623004

Cr-Commit-Position: refs/heads/master@{#29473}
parent b8ecd94c
...@@ -60,20 +60,20 @@ class V8_EXPORT Debug { ...@@ -60,20 +60,20 @@ class V8_EXPORT Debug {
* callbacks as their content becomes invalid. These objects are from the * callbacks as their content becomes invalid. These objects are from the
* debugger event that started the debug message loop. * debugger event that started the debug message loop.
*/ */
virtual Handle<Object> GetExecutionState() const = 0; virtual Local<Object> GetExecutionState() const = 0;
virtual Handle<Object> GetEventData() const = 0; virtual Local<Object> GetEventData() const = 0;
/** /**
* Get the debugger protocol JSON. * Get the debugger protocol JSON.
*/ */
virtual Handle<String> GetJSON() const = 0; virtual Local<String> GetJSON() const = 0;
/** /**
* Get the context active when the debug event happened. Note this is not * Get the context active when the debug event happened. Note this is not
* the current active context as the JavaScript part of the debugger is * the current active context as the JavaScript part of the debugger is
* running in its own context which is entered at this point. * running in its own context which is entered at this point.
*/ */
virtual Handle<Context> GetEventContext() const = 0; virtual Local<Context> GetEventContext() const = 0;
/** /**
* Client data passed with the corresponding request if any. This is the * Client data passed with the corresponding request if any. This is the
...@@ -104,21 +104,21 @@ class V8_EXPORT Debug { ...@@ -104,21 +104,21 @@ class V8_EXPORT Debug {
* Access to execution state and event data of the debug event. Don't store * Access to execution state and event data of the debug event. Don't store
* these cross callbacks as their content becomes invalid. * these cross callbacks as their content becomes invalid.
*/ */
virtual Handle<Object> GetExecutionState() const = 0; virtual Local<Object> GetExecutionState() const = 0;
virtual Handle<Object> GetEventData() const = 0; virtual Local<Object> GetEventData() const = 0;
/** /**
* Get the context active when the debug event happened. Note this is not * Get the context active when the debug event happened. Note this is not
* the current active context as the JavaScript part of the debugger is * the current active context as the JavaScript part of the debugger is
* running in its own context which is entered at this point. * running in its own context which is entered at this point.
*/ */
virtual Handle<Context> GetEventContext() const = 0; virtual Local<Context> GetEventContext() const = 0;
/** /**
* Client data passed with the corresponding callback when it was * Client data passed with the corresponding callback when it was
* registered. * registered.
*/ */
virtual Handle<Value> GetCallbackData() const = 0; virtual Local<Value> GetCallbackData() const = 0;
/** /**
* Client data passed to DebugBreakForCommand function. The * Client data passed to DebugBreakForCommand function. The
...@@ -156,7 +156,7 @@ class V8_EXPORT Debug { ...@@ -156,7 +156,7 @@ class V8_EXPORT Debug {
typedef void (*DebugMessageDispatchHandler)(); typedef void (*DebugMessageDispatchHandler)();
static bool SetDebugEventListener(EventCallback that, static bool SetDebugEventListener(EventCallback that,
Handle<Value> data = Handle<Value>()); Local<Value> data = Local<Value>());
// Schedule a debugger break to happen when JavaScript code is run // Schedule a debugger break to happen when JavaScript code is run
// in the given isolate. // in the given isolate.
...@@ -196,20 +196,20 @@ class V8_EXPORT Debug { ...@@ -196,20 +196,20 @@ class V8_EXPORT Debug {
*/ */
static V8_DEPRECATE_SOON( static V8_DEPRECATE_SOON(
"Use maybe version", "Use maybe version",
Local<Value> Call(v8::Handle<v8::Function> fun, Local<Value> Call(v8::Local<v8::Function> fun,
Handle<Value> data = Handle<Value>())); Local<Value> data = Local<Value>()));
// TODO(dcarney): data arg should be a MaybeLocal // TODO(dcarney): data arg should be a MaybeLocal
static MaybeLocal<Value> Call(Local<Context> context, static MaybeLocal<Value> Call(Local<Context> context,
v8::Handle<v8::Function> fun, v8::Local<v8::Function> fun,
Handle<Value> data = Handle<Value>()); Local<Value> data = Local<Value>());
/** /**
* Returns a mirror object for the given object. * Returns a mirror object for the given object.
*/ */
static V8_DEPRECATE_SOON("Use maybe version", static V8_DEPRECATE_SOON("Use maybe version",
Local<Value> GetMirror(v8::Handle<v8::Value> obj)); Local<Value> GetMirror(v8::Local<v8::Value> obj));
static MaybeLocal<Value> GetMirror(Local<Context> context, static MaybeLocal<Value> GetMirror(Local<Context> context,
v8::Handle<v8::Value> obj); v8::Local<v8::Value> obj);
/** /**
* Makes V8 process all pending debug messages. * Makes V8 process all pending debug messages.
......
...@@ -60,13 +60,13 @@ class V8_EXPORT CpuProfileNode { ...@@ -60,13 +60,13 @@ class V8_EXPORT CpuProfileNode {
}; };
/** Returns function name (empty string for anonymous functions.) */ /** Returns function name (empty string for anonymous functions.) */
Handle<String> GetFunctionName() const; Local<String> GetFunctionName() const;
/** Returns id of the script where function is located. */ /** Returns id of the script where function is located. */
int GetScriptId() const; int GetScriptId() const;
/** Returns resource name for script from where the function originates. */ /** Returns resource name for script from where the function originates. */
Handle<String> GetScriptResourceName() const; Local<String> GetScriptResourceName() const;
/** /**
* Returns the number, 1-based, of the line where the function originates. * Returns the number, 1-based, of the line where the function originates.
...@@ -129,7 +129,7 @@ class V8_EXPORT CpuProfileNode { ...@@ -129,7 +129,7 @@ class V8_EXPORT CpuProfileNode {
class V8_EXPORT CpuProfile { class V8_EXPORT CpuProfile {
public: public:
/** Returns CPU profile title. */ /** Returns CPU profile title. */
Handle<String> GetTitle() const; Local<String> GetTitle() const;
/** Returns the root node of the top down call tree. */ /** Returns the root node of the top down call tree. */
const CpuProfileNode* GetTopDownRoot() const; const CpuProfileNode* GetTopDownRoot() const;
...@@ -198,13 +198,13 @@ class V8_EXPORT CpuProfiler { ...@@ -198,13 +198,13 @@ class V8_EXPORT CpuProfiler {
* |record_samples| parameter controls whether individual samples should * |record_samples| parameter controls whether individual samples should
* be recorded in addition to the aggregated tree. * be recorded in addition to the aggregated tree.
*/ */
void StartProfiling(Handle<String> title, bool record_samples = false); void StartProfiling(Local<String> title, bool record_samples = false);
/** /**
* Stops collecting CPU profile with a given title and returns it. * Stops collecting CPU profile with a given title and returns it.
* If the title given is empty, finishes the last profile started. * If the title given is empty, finishes the last profile started.
*/ */
CpuProfile* StopProfiling(Handle<String> title); CpuProfile* StopProfiling(Local<String> title);
/** /**
* Tells the profiler whether the embedder is idle. * Tells the profiler whether the embedder is idle.
...@@ -246,7 +246,7 @@ class V8_EXPORT HeapGraphEdge { ...@@ -246,7 +246,7 @@ class V8_EXPORT HeapGraphEdge {
* Returns edge name. This can be a variable name, an element index, or * Returns edge name. This can be a variable name, an element index, or
* a property name. * a property name.
*/ */
Handle<Value> GetName() const; Local<Value> GetName() const;
/** Returns origin node. */ /** Returns origin node. */
const HeapGraphNode* GetFromNode() const; const HeapGraphNode* GetFromNode() const;
...@@ -287,7 +287,7 @@ class V8_EXPORT HeapGraphNode { ...@@ -287,7 +287,7 @@ class V8_EXPORT HeapGraphNode {
* of the constructor (for objects), the name of the function (for * of the constructor (for objects), the name of the function (for
* closures), string value, or an empty string (for compiled code). * closures), string value, or an empty string (for compiled code).
*/ */
Handle<String> GetName() const; Local<String> GetName() const;
/** /**
* Returns node id. For the same heap object, the id remains the same * Returns node id. For the same heap object, the id remains the same
...@@ -430,8 +430,8 @@ class V8_EXPORT HeapProfiler { ...@@ -430,8 +430,8 @@ class V8_EXPORT HeapProfiler {
* while the callback is running: only getters on the handle and * while the callback is running: only getters on the handle and
* GetPointerFromInternalField on the objects are allowed. * GetPointerFromInternalField on the objects are allowed.
*/ */
typedef RetainedObjectInfo* (*WrapperInfoCallback) typedef RetainedObjectInfo* (*WrapperInfoCallback)(uint16_t class_id,
(uint16_t class_id, Handle<Value> wrapper); Local<Value> wrapper);
/** Returns the number of snapshots taken. */ /** Returns the number of snapshots taken. */
int GetSnapshotCount(); int GetSnapshotCount();
...@@ -443,13 +443,13 @@ class V8_EXPORT HeapProfiler { ...@@ -443,13 +443,13 @@ class V8_EXPORT HeapProfiler {
* Returns SnapshotObjectId for a heap object referenced by |value| if * Returns SnapshotObjectId for a heap object referenced by |value| if
* it has been seen by the heap profiler, kUnknownObjectId otherwise. * it has been seen by the heap profiler, kUnknownObjectId otherwise.
*/ */
SnapshotObjectId GetObjectId(Handle<Value> value); SnapshotObjectId GetObjectId(Local<Value> value);
/** /**
* Returns heap object with given SnapshotObjectId if the object is alive, * Returns heap object with given SnapshotObjectId if the object is alive,
* otherwise empty handle is returned. * otherwise empty handle is returned.
*/ */
Handle<Value> FindObjectById(SnapshotObjectId id); Local<Value> FindObjectById(SnapshotObjectId id);
/** /**
* Clears internal map from SnapshotObjectId to heap object. The new objects * Clears internal map from SnapshotObjectId to heap object. The new objects
...@@ -474,7 +474,8 @@ class V8_EXPORT HeapProfiler { ...@@ -474,7 +474,8 @@ class V8_EXPORT HeapProfiler {
* Returns name to be used in the heap snapshot for given node. Returned * Returns name to be used in the heap snapshot for given node. Returned
* string must stay alive until snapshot collection is completed. * string must stay alive until snapshot collection is completed.
*/ */
virtual const char* GetName(Handle<Object> object) = 0; virtual const char* GetName(Local<Object> object) = 0;
protected: protected:
virtual ~ObjectNameResolver() {} virtual ~ObjectNameResolver() {}
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -11,18 +11,18 @@ namespace v8 { ...@@ -11,18 +11,18 @@ namespace v8 {
namespace internal { namespace internal {
template<typename T> template <typename T>
template<typename V> template <typename V>
v8::Handle<V> CustomArguments<T>::GetReturnValue(Isolate* isolate) { v8::Local<V> CustomArguments<T>::GetReturnValue(Isolate* isolate) {
// Check the ReturnValue. // Check the ReturnValue.
Object** handle = &this->begin()[kReturnValueOffset]; Object** handle = &this->begin()[kReturnValueOffset];
// Nothing was set, return empty handle as per previous behaviour. // Nothing was set, return empty handle as per previous behaviour.
if ((*handle)->IsTheHole()) return v8::Handle<V>(); if ((*handle)->IsTheHole()) return v8::Local<V>();
return Utils::Convert<Object, V>(Handle<Object>(handle)); return Utils::Convert<Object, V>(Handle<Object>(handle));
} }
v8::Handle<v8::Value> FunctionCallbackArguments::Call(FunctionCallback f) { v8::Local<v8::Value> FunctionCallbackArguments::Call(FunctionCallback f) {
Isolate* isolate = this->isolate(); Isolate* isolate = this->isolate();
VMState<EXTERNAL> state(isolate); VMState<EXTERNAL> state(isolate);
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
...@@ -35,40 +35,39 @@ v8::Handle<v8::Value> FunctionCallbackArguments::Call(FunctionCallback f) { ...@@ -35,40 +35,39 @@ v8::Handle<v8::Value> FunctionCallbackArguments::Call(FunctionCallback f) {
} }
#define WRITE_CALL_0(Function, ReturnValue) \ #define WRITE_CALL_0(Function, ReturnValue) \
v8::Handle<ReturnValue> PropertyCallbackArguments::Call(Function f) { \ v8::Local<ReturnValue> PropertyCallbackArguments::Call(Function f) { \
Isolate* isolate = this->isolate(); \ Isolate* isolate = this->isolate(); \
VMState<EXTERNAL> state(isolate); \ VMState<EXTERNAL> state(isolate); \
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
PropertyCallbackInfo<ReturnValue> info(begin()); \ PropertyCallbackInfo<ReturnValue> info(begin()); \
f(info); \ f(info); \
return GetReturnValue<ReturnValue>(isolate); \ return GetReturnValue<ReturnValue>(isolate); \
} }
#define WRITE_CALL_1(Function, ReturnValue, Arg1) \ #define WRITE_CALL_1(Function, ReturnValue, Arg1) \
v8::Handle<ReturnValue> PropertyCallbackArguments::Call(Function f, \ v8::Local<ReturnValue> PropertyCallbackArguments::Call(Function f, \
Arg1 arg1) { \ Arg1 arg1) { \
Isolate* isolate = this->isolate(); \ Isolate* isolate = this->isolate(); \
VMState<EXTERNAL> state(isolate); \ VMState<EXTERNAL> state(isolate); \
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
PropertyCallbackInfo<ReturnValue> info(begin()); \ PropertyCallbackInfo<ReturnValue> info(begin()); \
f(arg1, info); \ f(arg1, info); \
return GetReturnValue<ReturnValue>(isolate); \ return GetReturnValue<ReturnValue>(isolate); \
} }
#define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2) \ #define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2) \
v8::Handle<ReturnValue> PropertyCallbackArguments::Call(Function f, \ v8::Local<ReturnValue> PropertyCallbackArguments::Call( \
Arg1 arg1, \ Function f, Arg1 arg1, Arg2 arg2) { \
Arg2 arg2) { \ Isolate* isolate = this->isolate(); \
Isolate* isolate = this->isolate(); \ VMState<EXTERNAL> state(isolate); \
VMState<EXTERNAL> state(isolate); \ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ PropertyCallbackInfo<ReturnValue> info(begin()); \
PropertyCallbackInfo<ReturnValue> info(begin()); \ f(arg1, arg2, info); \
f(arg1, arg2, info); \ return GetReturnValue<ReturnValue>(isolate); \
return GetReturnValue<ReturnValue>(isolate); \ }
}
#define WRITE_CALL_2_VOID(Function, ReturnValue, Arg1, Arg2) \ #define WRITE_CALL_2_VOID(Function, ReturnValue, Arg1, Arg2) \
......
...@@ -128,8 +128,8 @@ class CustomArguments : public CustomArgumentsBase<T::kArgsLength> { ...@@ -128,8 +128,8 @@ class CustomArguments : public CustomArgumentsBase<T::kArgsLength> {
protected: protected:
explicit inline CustomArguments(Isolate* isolate) : Super(isolate) {} explicit inline CustomArguments(Isolate* isolate) : Super(isolate) {}
template<typename V> template <typename V>
v8::Handle<V> GetReturnValue(Isolate* isolate); v8::Local<V> GetReturnValue(Isolate* isolate);
inline Isolate* isolate() { inline Isolate* isolate() {
return reinterpret_cast<Isolate*>(this->begin()[T::kIsolateIndex]); return reinterpret_cast<Isolate*>(this->begin()[T::kIsolateIndex]);
...@@ -177,14 +177,14 @@ class PropertyCallbackArguments ...@@ -177,14 +177,14 @@ class PropertyCallbackArguments
* and used if it's been set to anything inside the callback. * and used if it's been set to anything inside the callback.
* New style callbacks always use the return value. * New style callbacks always use the return value.
*/ */
#define WRITE_CALL_0(Function, ReturnValue) \ #define WRITE_CALL_0(Function, ReturnValue) \
v8::Handle<ReturnValue> Call(Function f); \ v8::Local<ReturnValue> Call(Function f);
#define WRITE_CALL_1(Function, ReturnValue, Arg1) \ #define WRITE_CALL_1(Function, ReturnValue, Arg1) \
v8::Handle<ReturnValue> Call(Function f, Arg1 arg1); \ v8::Local<ReturnValue> Call(Function f, Arg1 arg1);
#define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2) \ #define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2) \
v8::Handle<ReturnValue> Call(Function f, Arg1 arg1, Arg2 arg2); \ v8::Local<ReturnValue> Call(Function f, Arg1 arg1, Arg2 arg2);
#define WRITE_CALL_2_VOID(Function, ReturnValue, Arg1, Arg2) \ #define WRITE_CALL_2_VOID(Function, ReturnValue, Arg1, Arg2) \
void Call(Function f, Arg1 arg1, Arg2 arg2); \ void Call(Function f, Arg1 arg1, Arg2 arg2); \
...@@ -250,7 +250,7 @@ class FunctionCallbackArguments ...@@ -250,7 +250,7 @@ class FunctionCallbackArguments
* and used if it's been set to anything inside the callback. * and used if it's been set to anything inside the callback.
* New style callbacks always use the return value. * New style callbacks always use the return value.
*/ */
v8::Handle<v8::Value> Call(FunctionCallback f); v8::Local<v8::Value> Call(FunctionCallback f);
private: private:
internal::Object** argv_; internal::Object** argv_;
......
...@@ -148,9 +148,8 @@ void Bootstrapper::TearDown() { ...@@ -148,9 +148,8 @@ void Bootstrapper::TearDown() {
class Genesis BASE_EMBEDDED { class Genesis BASE_EMBEDDED {
public: public:
Genesis(Isolate* isolate, Genesis(Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
MaybeHandle<JSGlobalProxy> maybe_global_proxy, v8::Local<v8::ObjectTemplate> global_proxy_template,
v8::Handle<v8::ObjectTemplate> global_proxy_template,
v8::ExtensionConfiguration* extensions); v8::ExtensionConfiguration* extensions);
~Genesis() { } ~Genesis() { }
...@@ -185,7 +184,7 @@ class Genesis BASE_EMBEDDED { ...@@ -185,7 +184,7 @@ class Genesis BASE_EMBEDDED {
// we have to used the deserialized ones that are linked together with the // we have to used the deserialized ones that are linked together with the
// rest of the context snapshot. // rest of the context snapshot.
Handle<GlobalObject> CreateNewGlobals( Handle<GlobalObject> CreateNewGlobals(
v8::Handle<v8::ObjectTemplate> global_proxy_template, v8::Local<v8::ObjectTemplate> global_proxy_template,
Handle<JSGlobalProxy> global_proxy); Handle<JSGlobalProxy> global_proxy);
// Hooks the given global proxy into the context. If the context was created // Hooks the given global proxy into the context. If the context was created
// by deserialization then this will unhook the global proxy that was // by deserialization then this will unhook the global proxy that was
...@@ -274,7 +273,7 @@ class Genesis BASE_EMBEDDED { ...@@ -274,7 +273,7 @@ class Genesis BASE_EMBEDDED {
bool ConfigureApiObject(Handle<JSObject> object, bool ConfigureApiObject(Handle<JSObject> object,
Handle<ObjectTemplateInfo> object_template); Handle<ObjectTemplateInfo> object_template);
bool ConfigureGlobalObjects( bool ConfigureGlobalObjects(
v8::Handle<v8::ObjectTemplate> global_proxy_template); v8::Local<v8::ObjectTemplate> global_proxy_template);
// Migrates all properties from the 'from' object to the 'to' // Migrates all properties from the 'from' object to the 'to'
// object and overrides the prototype in 'to' with the one from // object and overrides the prototype in 'to' with the one from
...@@ -350,7 +349,7 @@ void Bootstrapper::Iterate(ObjectVisitor* v) { ...@@ -350,7 +349,7 @@ void Bootstrapper::Iterate(ObjectVisitor* v) {
Handle<Context> Bootstrapper::CreateEnvironment( Handle<Context> Bootstrapper::CreateEnvironment(
MaybeHandle<JSGlobalProxy> maybe_global_proxy, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Handle<v8::ObjectTemplate> global_proxy_template, v8::Local<v8::ObjectTemplate> global_proxy_template,
v8::ExtensionConfiguration* extensions) { v8::ExtensionConfiguration* extensions) {
HandleScope scope(isolate_); HandleScope scope(isolate_);
Genesis genesis( Genesis genesis(
...@@ -855,7 +854,7 @@ void Genesis::HookUpGlobalThisBinding(Handle<FixedArray> outdated_contexts) { ...@@ -855,7 +854,7 @@ void Genesis::HookUpGlobalThisBinding(Handle<FixedArray> outdated_contexts) {
Handle<GlobalObject> Genesis::CreateNewGlobals( Handle<GlobalObject> Genesis::CreateNewGlobals(
v8::Handle<v8::ObjectTemplate> global_proxy_template, v8::Local<v8::ObjectTemplate> global_proxy_template,
Handle<JSGlobalProxy> global_proxy) { Handle<JSGlobalProxy> global_proxy) {
// The argument global_proxy_template aka data is an ObjectTemplateInfo. // The argument global_proxy_template aka data is an ObjectTemplateInfo.
// It has a constructor pointer that points at global_constructor which is a // It has a constructor pointer that points at global_constructor which is a
...@@ -2858,7 +2857,7 @@ bool Genesis::InstallJSBuiltins(Handle<JSBuiltinsObject> builtins) { ...@@ -2858,7 +2857,7 @@ bool Genesis::InstallJSBuiltins(Handle<JSBuiltinsObject> builtins) {
bool Genesis::ConfigureGlobalObjects( bool Genesis::ConfigureGlobalObjects(
v8::Handle<v8::ObjectTemplate> global_proxy_template) { v8::Local<v8::ObjectTemplate> global_proxy_template) {
Handle<JSObject> global_proxy( Handle<JSObject> global_proxy(
JSObject::cast(native_context()->global_proxy())); JSObject::cast(native_context()->global_proxy()));
Handle<JSObject> global_object( Handle<JSObject> global_object(
...@@ -3079,10 +3078,9 @@ class NoTrackDoubleFieldsForSerializerScope { ...@@ -3079,10 +3078,9 @@ class NoTrackDoubleFieldsForSerializerScope {
Genesis::Genesis(Isolate* isolate, Genesis::Genesis(Isolate* isolate,
MaybeHandle<JSGlobalProxy> maybe_global_proxy, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Handle<v8::ObjectTemplate> global_proxy_template, v8::Local<v8::ObjectTemplate> global_proxy_template,
v8::ExtensionConfiguration* extensions) v8::ExtensionConfiguration* extensions)
: isolate_(isolate), : isolate_(isolate), active_(isolate->bootstrapper()) {
active_(isolate->bootstrapper()) {
NoTrackDoubleFieldsForSerializerScope disable_scope(isolate); NoTrackDoubleFieldsForSerializerScope disable_scope(isolate);
result_ = Handle<Context>::null(); result_ = Handle<Context>::null();
// Before creating the roots we must save the context and restore it // Before creating the roots we must save the context and restore it
......
...@@ -77,7 +77,7 @@ class Bootstrapper final { ...@@ -77,7 +77,7 @@ class Bootstrapper final {
// The returned value is a global handle casted to V8Environment*. // The returned value is a global handle casted to V8Environment*.
Handle<Context> CreateEnvironment( Handle<Context> CreateEnvironment(
MaybeHandle<JSGlobalProxy> maybe_global_proxy, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Handle<v8::ObjectTemplate> global_object_template, v8::Local<v8::ObjectTemplate> global_object_template,
v8::ExtensionConfiguration* extensions); v8::ExtensionConfiguration* extensions);
// Detach the environment from its outer global object. // Detach the environment from its outer global object.
......
...@@ -1089,7 +1089,7 @@ MUST_USE_RESULT static MaybeHandle<Object> HandleApiCallHelper( ...@@ -1089,7 +1089,7 @@ MUST_USE_RESULT static MaybeHandle<Object> HandleApiCallHelper(
args.length() - 1, args.length() - 1,
is_construct); is_construct);
v8::Handle<v8::Value> value = custom.Call(callback); v8::Local<v8::Value> value = custom.Call(callback);
Handle<Object> result; Handle<Object> result;
if (value.IsEmpty()) { if (value.IsEmpty()) {
result = isolate->factory()->undefined_value(); result = isolate->factory()->undefined_value();
...@@ -1226,7 +1226,7 @@ MUST_USE_RESULT static Object* HandleApiCallAsFunctionOrConstructor( ...@@ -1226,7 +1226,7 @@ MUST_USE_RESULT static Object* HandleApiCallAsFunctionOrConstructor(
&args[0] - 1, &args[0] - 1,
args.length() - 1, args.length() - 1,
is_construct_call); is_construct_call);
v8::Handle<v8::Value> value = custom.Call(callback); v8::Local<v8::Value> value = custom.Call(callback);
if (value.IsEmpty()) { if (value.IsEmpty()) {
result = heap->undefined_value(); result = heap->undefined_value();
} else { } else {
......
...@@ -468,7 +468,7 @@ namespace { ...@@ -468,7 +468,7 @@ namespace {
Handle<JSFunction> GetFunction(Isolate* isolate, const char* name) { Handle<JSFunction> GetFunction(Isolate* isolate, const char* name) {
v8::ExtensionConfiguration no_extensions; v8::ExtensionConfiguration no_extensions;
Handle<Context> ctx = isolate->bootstrapper()->CreateEnvironment( Handle<Context> ctx = isolate->bootstrapper()->CreateEnvironment(
MaybeHandle<JSGlobalProxy>(), v8::Handle<v8::ObjectTemplate>(), MaybeHandle<JSGlobalProxy>(), v8::Local<v8::ObjectTemplate>(),
&no_extensions); &no_extensions);
Handle<JSBuiltinsObject> builtins = handle(ctx->builtins()); Handle<JSBuiltinsObject> builtins = handle(ctx->builtins());
MaybeHandle<Object> fun = Object::GetProperty(isolate, builtins, name); MaybeHandle<Object> fun = Object::GetProperty(isolate, builtins, name);
......
...@@ -48,7 +48,7 @@ Debug::Debug(Isolate* isolate) ...@@ -48,7 +48,7 @@ Debug::Debug(Isolate* isolate)
} }
static v8::Handle<v8::Context> GetDebugEventContext(Isolate* isolate) { static v8::Local<v8::Context> GetDebugEventContext(Isolate* isolate) {
Handle<Context> context = isolate->debug()->debugger_entry()->GetContext(); Handle<Context> context = isolate->debug()->debugger_entry()->GetContext();
// Isolate::context() may have been NULL when "script collected" event // Isolate::context() may have been NULL when "script collected" event
// occured. // occured.
...@@ -684,11 +684,9 @@ bool Debug::Load() { ...@@ -684,11 +684,9 @@ bool Debug::Load() {
// Create the debugger context. // Create the debugger context.
HandleScope scope(isolate_); HandleScope scope(isolate_);
ExtensionConfiguration no_extensions; ExtensionConfiguration no_extensions;
Handle<Context> context = Handle<Context> context = isolate_->bootstrapper()->CreateEnvironment(
isolate_->bootstrapper()->CreateEnvironment( MaybeHandle<JSGlobalProxy>(), v8::Local<ObjectTemplate>(),
MaybeHandle<JSGlobalProxy>(), &no_extensions);
v8::Handle<ObjectTemplate>(),
&no_extensions);
// Fail if no context could be created. // Fail if no context could be created.
if (context.is_null()) return false; if (context.is_null()) return false;
...@@ -3201,7 +3199,7 @@ bool MessageImpl::WillStartRunning() const { ...@@ -3201,7 +3199,7 @@ bool MessageImpl::WillStartRunning() const {
} }
v8::Handle<v8::Object> MessageImpl::GetExecutionState() const { v8::Local<v8::Object> MessageImpl::GetExecutionState() const {
return v8::Utils::ToLocal(exec_state_); return v8::Utils::ToLocal(exec_state_);
} }
...@@ -3211,12 +3209,12 @@ v8::Isolate* MessageImpl::GetIsolate() const { ...@@ -3211,12 +3209,12 @@ v8::Isolate* MessageImpl::GetIsolate() const {
} }
v8::Handle<v8::Object> MessageImpl::GetEventData() const { v8::Local<v8::Object> MessageImpl::GetEventData() const {
return v8::Utils::ToLocal(event_data_); return v8::Utils::ToLocal(event_data_);
} }
v8::Handle<v8::String> MessageImpl::GetJSON() const { v8::Local<v8::String> MessageImpl::GetJSON() const {
Isolate* isolate = event_data_->GetIsolate(); Isolate* isolate = event_data_->GetIsolate();
v8::EscapableHandleScope scope(reinterpret_cast<v8::Isolate*>(isolate)); v8::EscapableHandleScope scope(reinterpret_cast<v8::Isolate*>(isolate));
...@@ -3225,14 +3223,14 @@ v8::Handle<v8::String> MessageImpl::GetJSON() const { ...@@ -3225,14 +3223,14 @@ v8::Handle<v8::String> MessageImpl::GetJSON() const {
Handle<Object> fun = Object::GetProperty( Handle<Object> fun = Object::GetProperty(
isolate, event_data_, "toJSONProtocol").ToHandleChecked(); isolate, event_data_, "toJSONProtocol").ToHandleChecked();
if (!fun->IsJSFunction()) { if (!fun->IsJSFunction()) {
return v8::Handle<v8::String>(); return v8::Local<v8::String>();
} }
MaybeHandle<Object> maybe_json = MaybeHandle<Object> maybe_json =
Execution::TryCall(Handle<JSFunction>::cast(fun), event_data_, 0, NULL); Execution::TryCall(Handle<JSFunction>::cast(fun), event_data_, 0, NULL);
Handle<Object> json; Handle<Object> json;
if (!maybe_json.ToHandle(&json) || !json->IsString()) { if (!maybe_json.ToHandle(&json) || !json->IsString()) {
return v8::Handle<v8::String>(); return v8::Local<v8::String>();
} }
return scope.Escape(v8::Utils::ToLocal(Handle<String>::cast(json))); return scope.Escape(v8::Utils::ToLocal(Handle<String>::cast(json)));
} else { } else {
...@@ -3241,9 +3239,9 @@ v8::Handle<v8::String> MessageImpl::GetJSON() const { ...@@ -3241,9 +3239,9 @@ v8::Handle<v8::String> MessageImpl::GetJSON() const {
} }
v8::Handle<v8::Context> MessageImpl::GetEventContext() const { v8::Local<v8::Context> MessageImpl::GetEventContext() const {
Isolate* isolate = event_data_->GetIsolate(); Isolate* isolate = event_data_->GetIsolate();
v8::Handle<v8::Context> context = GetDebugEventContext(isolate); v8::Local<v8::Context> context = GetDebugEventContext(isolate);
// Isolate::context() may be NULL when "script collected" event occurs. // Isolate::context() may be NULL when "script collected" event occurs.
DCHECK(!context.IsEmpty()); DCHECK(!context.IsEmpty());
return context; return context;
...@@ -3272,22 +3270,22 @@ DebugEvent EventDetailsImpl::GetEvent() const { ...@@ -3272,22 +3270,22 @@ DebugEvent EventDetailsImpl::GetEvent() const {
} }
v8::Handle<v8::Object> EventDetailsImpl::GetExecutionState() const { v8::Local<v8::Object> EventDetailsImpl::GetExecutionState() const {
return v8::Utils::ToLocal(exec_state_); return v8::Utils::ToLocal(exec_state_);
} }
v8::Handle<v8::Object> EventDetailsImpl::GetEventData() const { v8::Local<v8::Object> EventDetailsImpl::GetEventData() const {
return v8::Utils::ToLocal(event_data_); return v8::Utils::ToLocal(event_data_);
} }
v8::Handle<v8::Context> EventDetailsImpl::GetEventContext() const { v8::Local<v8::Context> EventDetailsImpl::GetEventContext() const {
return GetDebugEventContext(exec_state_->GetIsolate()); return GetDebugEventContext(exec_state_->GetIsolate());
} }
v8::Handle<v8::Value> EventDetailsImpl::GetCallbackData() const { v8::Local<v8::Value> EventDetailsImpl::GetCallbackData() const {
return v8::Utils::ToLocal(callback_data_); return v8::Utils::ToLocal(callback_data_);
} }
......
...@@ -285,10 +285,10 @@ class MessageImpl: public v8::Debug::Message { ...@@ -285,10 +285,10 @@ class MessageImpl: public v8::Debug::Message {
virtual bool IsResponse() const; virtual bool IsResponse() const;
virtual DebugEvent GetEvent() const; virtual DebugEvent GetEvent() const;
virtual bool WillStartRunning() const; virtual bool WillStartRunning() const;
virtual v8::Handle<v8::Object> GetExecutionState() const; virtual v8::Local<v8::Object> GetExecutionState() const;
virtual v8::Handle<v8::Object> GetEventData() const; virtual v8::Local<v8::Object> GetEventData() const;
virtual v8::Handle<v8::String> GetJSON() const; virtual v8::Local<v8::String> GetJSON() const;
virtual v8::Handle<v8::Context> GetEventContext() const; virtual v8::Local<v8::Context> GetEventContext() const;
virtual v8::Debug::ClientData* GetClientData() const; virtual v8::Debug::ClientData* GetClientData() const;
virtual v8::Isolate* GetIsolate() const; virtual v8::Isolate* GetIsolate() const;
...@@ -320,10 +320,10 @@ class EventDetailsImpl : public v8::Debug::EventDetails { ...@@ -320,10 +320,10 @@ class EventDetailsImpl : public v8::Debug::EventDetails {
Handle<Object> callback_data, Handle<Object> callback_data,
v8::Debug::ClientData* client_data); v8::Debug::ClientData* client_data);
virtual DebugEvent GetEvent() const; virtual DebugEvent GetEvent() const;
virtual v8::Handle<v8::Object> GetExecutionState() const; virtual v8::Local<v8::Object> GetExecutionState() const;
virtual v8::Handle<v8::Object> GetEventData() const; virtual v8::Local<v8::Object> GetEventData() const;
virtual v8::Handle<v8::Context> GetEventContext() const; virtual v8::Local<v8::Context> GetEventContext() const;
virtual v8::Handle<v8::Value> GetCallbackData() const; virtual v8::Local<v8::Value> GetCallbackData() const;
virtual v8::Debug::ClientData* GetClientData() const; virtual v8::Debug::ClientData* GetClientData() const;
private: private:
DebugEvent event_; // Debug event causing the break. DebugEvent event_; // Debug event causing the break.
......
...@@ -37,9 +37,9 @@ const char* const ExternalizeStringExtension::kSource = ...@@ -37,9 +37,9 @@ const char* const ExternalizeStringExtension::kSource =
"native function externalizeString();" "native function externalizeString();"
"native function isOneByteString();"; "native function isOneByteString();";
v8::Handle<v8::FunctionTemplate> v8::Local<v8::FunctionTemplate>
ExternalizeStringExtension::GetNativeFunctionTemplate( ExternalizeStringExtension::GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Handle<v8::String> str) { v8::Isolate* isolate, v8::Local<v8::String> str) {
if (strcmp(*v8::String::Utf8Value(str), "externalizeString") == 0) { if (strcmp(*v8::String::Utf8Value(str), "externalizeString") == 0) {
return v8::FunctionTemplate::New(isolate, return v8::FunctionTemplate::New(isolate,
ExternalizeStringExtension::Externalize); ExternalizeStringExtension::Externalize);
......
...@@ -13,9 +13,8 @@ namespace internal { ...@@ -13,9 +13,8 @@ namespace internal {
class ExternalizeStringExtension : public v8::Extension { class ExternalizeStringExtension : public v8::Extension {
public: public:
ExternalizeStringExtension() : v8::Extension("v8/externalize", kSource) {} ExternalizeStringExtension() : v8::Extension("v8/externalize", kSource) {}
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> name);
v8::Handle<v8::String> name);
static void Externalize(const v8::FunctionCallbackInfo<v8::Value>& args); static void Externalize(const v8::FunctionCallbackInfo<v8::Value>& args);
static void IsOneByte(const v8::FunctionCallbackInfo<v8::Value>& args); static void IsOneByte(const v8::FunctionCallbackInfo<v8::Value>& args);
......
...@@ -11,16 +11,15 @@ namespace v8 { ...@@ -11,16 +11,15 @@ namespace v8 {
namespace internal { namespace internal {
v8::Handle<v8::FunctionTemplate> FreeBufferExtension::GetNativeFunctionTemplate( v8::Local<v8::FunctionTemplate> FreeBufferExtension::GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> str) {
v8::Handle<v8::String> str) {
return v8::FunctionTemplate::New(isolate, FreeBufferExtension::FreeBuffer); return v8::FunctionTemplate::New(isolate, FreeBufferExtension::FreeBuffer);
} }
void FreeBufferExtension::FreeBuffer( void FreeBufferExtension::FreeBuffer(
const v8::FunctionCallbackInfo<v8::Value>& args) { const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Handle<v8::ArrayBuffer> arrayBuffer = args[0].As<v8::ArrayBuffer>(); v8::Local<v8::ArrayBuffer> arrayBuffer = args[0].As<v8::ArrayBuffer>();
v8::ArrayBuffer::Contents contents = arrayBuffer->Externalize(); v8::ArrayBuffer::Contents contents = arrayBuffer->Externalize();
Isolate* isolate = reinterpret_cast<Isolate*>(args.GetIsolate()); Isolate* isolate = reinterpret_cast<Isolate*>(args.GetIsolate());
isolate->array_buffer_allocator()->Free(contents.Data(), isolate->array_buffer_allocator()->Free(contents.Data(),
......
...@@ -14,9 +14,8 @@ class FreeBufferExtension : public v8::Extension { ...@@ -14,9 +14,8 @@ class FreeBufferExtension : public v8::Extension {
public: public:
FreeBufferExtension() FreeBufferExtension()
: v8::Extension("v8/free-buffer", "native function freeBuffer();") {} : v8::Extension("v8/free-buffer", "native function freeBuffer();") {}
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> name);
v8::Handle<v8::String> name);
static void FreeBuffer(const v8::FunctionCallbackInfo<v8::Value>& args); static void FreeBuffer(const v8::FunctionCallbackInfo<v8::Value>& args);
}; };
......
...@@ -10,9 +10,8 @@ namespace v8 { ...@@ -10,9 +10,8 @@ namespace v8 {
namespace internal { namespace internal {
v8::Handle<v8::FunctionTemplate> GCExtension::GetNativeFunctionTemplate( v8::Local<v8::FunctionTemplate> GCExtension::GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> str) {
v8::Handle<v8::String> str) {
return v8::FunctionTemplate::New(isolate, GCExtension::GC); return v8::FunctionTemplate::New(isolate, GCExtension::GC);
} }
......
...@@ -15,9 +15,8 @@ class GCExtension : public v8::Extension { ...@@ -15,9 +15,8 @@ class GCExtension : public v8::Extension {
explicit GCExtension(const char* fun_name) explicit GCExtension(const char* fun_name)
: v8::Extension("v8/gc", : v8::Extension("v8/gc",
BuildSource(buffer_, sizeof(buffer_), fun_name)) {} BuildSource(buffer_, sizeof(buffer_), fun_name)) {}
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> name);
v8::Handle<v8::String> name);
static void GC(const v8::FunctionCallbackInfo<v8::Value>& args); static void GC(const v8::FunctionCallbackInfo<v8::Value>& args);
private: private:
......
...@@ -11,9 +11,8 @@ const char* const StatisticsExtension::kSource = ...@@ -11,9 +11,8 @@ const char* const StatisticsExtension::kSource =
"native function getV8Statistics();"; "native function getV8Statistics();";
v8::Handle<v8::FunctionTemplate> StatisticsExtension::GetNativeFunctionTemplate( v8::Local<v8::FunctionTemplate> StatisticsExtension::GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> str) {
v8::Handle<v8::String> str) {
DCHECK(strcmp(*v8::String::Utf8Value(str), "getV8Statistics") == 0); DCHECK(strcmp(*v8::String::Utf8Value(str), "getV8Statistics") == 0);
return v8::FunctionTemplate::New(isolate, StatisticsExtension::GetCounters); return v8::FunctionTemplate::New(isolate, StatisticsExtension::GetCounters);
} }
......
...@@ -13,9 +13,8 @@ namespace internal { ...@@ -13,9 +13,8 @@ namespace internal {
class StatisticsExtension : public v8::Extension { class StatisticsExtension : public v8::Extension {
public: public:
StatisticsExtension() : v8::Extension("v8/statistics", kSource) {} StatisticsExtension() : v8::Extension("v8/statistics", kSource) {}
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> name);
v8::Handle<v8::String> name);
static void GetCounters(const v8::FunctionCallbackInfo<v8::Value>& args); static void GetCounters(const v8::FunctionCallbackInfo<v8::Value>& args);
private: private:
......
...@@ -15,10 +15,9 @@ const char* const TriggerFailureExtension::kSource = ...@@ -15,10 +15,9 @@ const char* const TriggerFailureExtension::kSource =
"native function triggerSlowAssertFalse();"; "native function triggerSlowAssertFalse();";
v8::Handle<v8::FunctionTemplate> v8::Local<v8::FunctionTemplate>
TriggerFailureExtension::GetNativeFunctionTemplate( TriggerFailureExtension::GetNativeFunctionTemplate(v8::Isolate* isolate,
v8::Isolate* isolate, v8::Local<v8::String> str) {
v8::Handle<v8::String> str) {
if (strcmp(*v8::String::Utf8Value(str), "triggerCheckFalse") == 0) { if (strcmp(*v8::String::Utf8Value(str), "triggerCheckFalse") == 0) {
return v8::FunctionTemplate::New( return v8::FunctionTemplate::New(
isolate, isolate,
......
...@@ -13,9 +13,8 @@ namespace internal { ...@@ -13,9 +13,8 @@ namespace internal {
class TriggerFailureExtension : public v8::Extension { class TriggerFailureExtension : public v8::Extension {
public: public:
TriggerFailureExtension() : v8::Extension("v8/trigger-failure", kSource) {} TriggerFailureExtension() : v8::Extension("v8/trigger-failure", kSource) {}
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Isolate* isolate, v8::Local<v8::String> name);
v8::Handle<v8::String> name);
static void TriggerCheckFalse( static void TriggerCheckFalse(
const v8::FunctionCallbackInfo<v8::Value>& args); const v8::FunctionCallbackInfo<v8::Value>& args);
static void TriggerAssertFalse( static void TriggerAssertFalse(
......
...@@ -1456,7 +1456,7 @@ void FullCodeGenerator::VisitNativeFunctionLiteral( ...@@ -1456,7 +1456,7 @@ void FullCodeGenerator::VisitNativeFunctionLiteral(
// Compute the function template for the native function. // Compute the function template for the native function.
Handle<String> name = expr->name(); Handle<String> name = expr->name();
v8::Handle<v8::FunctionTemplate> fun_template = v8::Local<v8::FunctionTemplate> fun_template =
expr->extension()->GetNativeFunctionTemplate(v8_isolate, expr->extension()->GetNativeFunctionTemplate(v8_isolate,
v8::Utils::ToLocal(name)); v8::Utils::ToLocal(name));
DCHECK(!fun_template.IsEmpty()); DCHECK(!fun_template.IsEmpty());
......
...@@ -738,7 +738,7 @@ icu::SimpleDateFormat* DateFormat::UnpackDateFormat( ...@@ -738,7 +738,7 @@ icu::SimpleDateFormat* DateFormat::UnpackDateFormat(
template<class T> template<class T>
void DeleteNativeObjectAt(const v8::WeakCallbackData<v8::Value, void>& data, void DeleteNativeObjectAt(const v8::WeakCallbackData<v8::Value, void>& data,
int index) { int index) {
v8::Local<v8::Object> obj = v8::Handle<v8::Object>::Cast(data.GetValue()); v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(data.GetValue());
delete reinterpret_cast<T*>(obj->GetAlignedPointerFromInternalField(index)); delete reinterpret_cast<T*>(obj->GetAlignedPointerFromInternalField(index));
} }
......
...@@ -334,8 +334,7 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor( ...@@ -334,8 +334,7 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(
LOG(isolate, ApiNamedPropertyAccess("load", *holder, *name)); LOG(isolate, ApiNamedPropertyAccess("load", *holder, *name));
PropertyCallbackArguments args(isolate, info->data(), *receiver, *holder); PropertyCallbackArguments args(isolate, info->data(), *receiver, *holder);
v8::Handle<v8::Value> result = v8::Local<v8::Value> result = args.Call(call_fun, v8::Utils::ToLocal(name));
args.Call(call_fun, v8::Utils::ToLocal(name));
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object);
if (result.IsEmpty()) { if (result.IsEmpty()) {
return ReadAbsentProperty(isolate, receiver, name, language_mode); return ReadAbsentProperty(isolate, receiver, name, language_mode);
...@@ -2982,7 +2981,7 @@ MaybeHandle<Object> JSObject::SetPropertyWithInterceptor(LookupIterator* it, ...@@ -2982,7 +2981,7 @@ MaybeHandle<Object> JSObject::SetPropertyWithInterceptor(LookupIterator* it,
if (interceptor->setter()->IsUndefined()) return MaybeHandle<Object>(); if (interceptor->setter()->IsUndefined()) return MaybeHandle<Object>();
Handle<JSObject> holder = it->GetHolder<JSObject>(); Handle<JSObject> holder = it->GetHolder<JSObject>();
v8::Handle<v8::Value> result; v8::Local<v8::Value> result;
PropertyCallbackArguments args(isolate, interceptor->data(), PropertyCallbackArguments args(isolate, interceptor->data(),
*it->GetReceiver(), *holder); *it->GetReceiver(), *holder);
...@@ -4347,7 +4346,7 @@ Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor( ...@@ -4347,7 +4346,7 @@ Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor(
PropertyCallbackArguments args(isolate, interceptor->data(), PropertyCallbackArguments args(isolate, interceptor->data(),
*it->GetReceiver(), *holder); *it->GetReceiver(), *holder);
if (!interceptor->query()->IsUndefined()) { if (!interceptor->query()->IsUndefined()) {
v8::Handle<v8::Integer> result; v8::Local<v8::Integer> result;
if (it->IsElement()) { if (it->IsElement()) {
uint32_t index = it->index(); uint32_t index = it->index();
v8::IndexedPropertyQueryCallback query = v8::IndexedPropertyQueryCallback query =
...@@ -4372,7 +4371,7 @@ Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor( ...@@ -4372,7 +4371,7 @@ Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor(
} }
} else if (!interceptor->getter()->IsUndefined()) { } else if (!interceptor->getter()->IsUndefined()) {
// TODO(verwaest): Use GetPropertyWithInterceptor? // TODO(verwaest): Use GetPropertyWithInterceptor?
v8::Handle<v8::Value> result; v8::Local<v8::Value> result;
if (it->IsElement()) { if (it->IsElement()) {
uint32_t index = it->index(); uint32_t index = it->index();
v8::IndexedPropertyGetterCallback getter = v8::IndexedPropertyGetterCallback getter =
...@@ -5114,7 +5113,7 @@ MaybeHandle<Object> JSObject::DeletePropertyWithInterceptor( ...@@ -5114,7 +5113,7 @@ MaybeHandle<Object> JSObject::DeletePropertyWithInterceptor(
PropertyCallbackArguments args(isolate, interceptor->data(), PropertyCallbackArguments args(isolate, interceptor->data(),
*it->GetReceiver(), *holder); *it->GetReceiver(), *holder);
v8::Handle<v8::Boolean> result; v8::Local<v8::Boolean> result;
if (it->IsElement()) { if (it->IsElement()) {
uint32_t index = it->index(); uint32_t index = it->index();
v8::IndexedPropertyDeleterCallback deleter = v8::IndexedPropertyDeleterCallback deleter =
...@@ -12901,7 +12900,7 @@ MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(LookupIterator* it, ...@@ -12901,7 +12900,7 @@ MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(LookupIterator* it,
} }
Handle<JSObject> holder = it->GetHolder<JSObject>(); Handle<JSObject> holder = it->GetHolder<JSObject>();
v8::Handle<v8::Value> result; v8::Local<v8::Value> result;
PropertyCallbackArguments args(isolate, interceptor->data(), PropertyCallbackArguments args(isolate, interceptor->data(),
*it->GetReceiver(), *holder); *it->GetReceiver(), *holder);
...@@ -12944,7 +12943,7 @@ MaybeHandle<JSObject> JSObject::GetKeysForNamedInterceptor( ...@@ -12944,7 +12943,7 @@ MaybeHandle<JSObject> JSObject::GetKeysForNamedInterceptor(
Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor()); Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor());
PropertyCallbackArguments PropertyCallbackArguments
args(isolate, interceptor->data(), *receiver, *object); args(isolate, interceptor->data(), *receiver, *object);
v8::Handle<v8::Object> result; v8::Local<v8::Object> result;
if (!interceptor->enumerator()->IsUndefined()) { if (!interceptor->enumerator()->IsUndefined()) {
v8::GenericNamedPropertyEnumeratorCallback enum_fun = v8::GenericNamedPropertyEnumeratorCallback enum_fun =
v8::ToCData<v8::GenericNamedPropertyEnumeratorCallback>( v8::ToCData<v8::GenericNamedPropertyEnumeratorCallback>(
...@@ -12967,7 +12966,7 @@ MaybeHandle<JSObject> JSObject::GetKeysForIndexedInterceptor( ...@@ -12967,7 +12966,7 @@ MaybeHandle<JSObject> JSObject::GetKeysForIndexedInterceptor(
Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor()); Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor());
PropertyCallbackArguments PropertyCallbackArguments
args(isolate, interceptor->data(), *receiver, *object); args(isolate, interceptor->data(), *receiver, *object);
v8::Handle<v8::Object> result; v8::Local<v8::Object> result;
if (!interceptor->enumerator()->IsUndefined()) { if (!interceptor->enumerator()->IsUndefined()) {
v8::IndexedPropertyEnumeratorCallback enum_fun = v8::IndexedPropertyEnumeratorCallback enum_fun =
v8::ToCData<v8::IndexedPropertyEnumeratorCallback>( v8::ToCData<v8::IndexedPropertyEnumeratorCallback>(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment