Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/include/v8-debug.h b/include/v8-debug.h
index 6abf4e0..0d0ee73 100644
--- a/include/v8-debug.h
+++ b/include/v8-debug.h
@@ -5,7 +5,7 @@
#ifndef V8_V8_DEBUG_H_
#define V8_V8_DEBUG_H_
-#include "v8.h"
+#include "v8.h" // NOLINT(build/include)
/**
* Debugger support for the V8 JavaScript engine.
@@ -22,7 +22,6 @@
CompileError = 6,
PromiseEvent = 7,
AsyncTaskEvent = 8,
- BreakForCommand = 9
};
@@ -61,20 +60,20 @@
* callbacks as their content becomes invalid. These objects are from the
* debugger event that started the debug message loop.
*/
- virtual Handle<Object> GetExecutionState() const = 0;
- virtual Handle<Object> GetEventData() const = 0;
+ virtual Local<Object> GetExecutionState() const = 0;
+ virtual Local<Object> GetEventData() const = 0;
/**
* 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
* the current active context as the JavaScript part of the debugger is
* 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
@@ -105,21 +104,21 @@
* Access to execution state and event data of the debug event. Don't store
* these cross callbacks as their content becomes invalid.
*/
- virtual Handle<Object> GetExecutionState() const = 0;
- virtual Handle<Object> GetEventData() const = 0;
+ virtual Local<Object> GetExecutionState() const = 0;
+ virtual Local<Object> GetEventData() const = 0;
/**
* 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
* 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
* registered.
*/
- virtual Handle<Value> GetCallbackData() const = 0;
+ virtual Local<Value> GetCallbackData() const = 0;
/**
* Client data passed to DebugBreakForCommand function. The
@@ -156,8 +155,11 @@
*/
typedef void (*DebugMessageDispatchHandler)();
- static bool SetDebugEventListener(EventCallback that,
- Handle<Value> data = Handle<Value>());
+ static bool SetDebugEventListener(Isolate* isolate, EventCallback that,
+ Local<Value> data = Local<Value>());
+ V8_DEPRECATED("Use version with an Isolate",
+ static bool SetDebugEventListener(
+ EventCallback that, Local<Value> data = Local<Value>()));
// Schedule a debugger break to happen when JavaScript code is run
// in the given isolate.
@@ -170,15 +172,10 @@
// Check if a debugger break is scheduled in the given isolate.
static bool CheckDebugBreak(Isolate* isolate);
- // Break execution of JavaScript in the given isolate (this method
- // can be invoked from a non-VM thread) for further client command
- // execution on a VM thread. Client data is then passed in
- // EventDetails to EventCallback2 at the moment when the VM actually
- // stops.
- static void DebugBreakForCommand(Isolate* isolate, ClientData* data);
-
// Message based interface. The message protocol is JSON.
- static void SetMessageHandler(MessageHandler handler);
+ static void SetMessageHandler(Isolate* isolate, MessageHandler handler);
+ V8_DEPRECATED("Use version with an Isolate",
+ static void SetMessageHandler(MessageHandler handler));
static void SendCommand(Isolate* isolate,
const uint16_t* command, int length,
@@ -202,13 +199,21 @@
* }
* \endcode
*/
- static Local<Value> Call(v8::Handle<v8::Function> fun,
- Handle<Value> data = Handle<Value>());
+ static V8_DEPRECATED("Use maybe version",
+ Local<Value> Call(v8::Local<v8::Function> fun,
+ Local<Value> data = Local<Value>()));
+ // TODO(dcarney): data arg should be a MaybeLocal
+ static MaybeLocal<Value> Call(Local<Context> context,
+ v8::Local<v8::Function> fun,
+ Local<Value> data = Local<Value>());
/**
* Returns a mirror object for the given object.
*/
- static Local<Value> GetMirror(v8::Handle<v8::Value> obj);
+ static V8_DEPRECATED("Use maybe version",
+ Local<Value> GetMirror(v8::Local<v8::Value> obj));
+ static MaybeLocal<Value> GetMirror(Local<Context> context,
+ v8::Local<v8::Value> obj);
/**
* Makes V8 process all pending debug messages.
@@ -241,15 +246,20 @@
* "Evaluate" debug command behavior currently is not specified in scope
* of this method.
*/
- static void ProcessDebugMessages();
+ static void ProcessDebugMessages(Isolate* isolate);
+ V8_DEPRECATED("Use version with an Isolate",
+ static void ProcessDebugMessages());
/**
* Debugger is running in its own context which is entered while debugger
* messages are being dispatched. This is an explicit getter for this
* debugger context. Note that the content of the debugger context is subject
- * to change.
+ * to change. The Context exists only when the debugger is active, i.e. at
+ * least one DebugEventListener or MessageHandler is set.
*/
- static Local<Context> GetDebugContext();
+ static Local<Context> GetDebugContext(Isolate* isolate);
+ V8_DEPRECATED("Use version with an Isolate",
+ static Local<Context> GetDebugContext());
/**
@@ -258,6 +268,14 @@
* unexpectedly used. LiveEdit is enabled by default.
*/
static void SetLiveEditEnabled(Isolate* isolate, bool enable);
+
+ /**
+ * Returns array of internal properties specific to the value type. Result has
+ * the following format: [<name>, <value>,...,<name>, <value>]. Result array
+ * will be allocated in the current context.
+ */
+ static MaybeLocal<Array> GetInternalProperties(Isolate* isolate,
+ Local<Value> value);
};