v8-debug.h   v8-debug.h 
skipping to change at line 78 skipping to change at line 78
*/ */
namespace v8 { namespace v8 {
// Debug events which can occur in the V8 JavaScript engine. // Debug events which can occur in the V8 JavaScript engine.
enum DebugEvent { enum DebugEvent {
Break = 1, Break = 1,
Exception = 2, Exception = 2,
NewFunction = 3, NewFunction = 3,
BeforeCompile = 4, BeforeCompile = 4,
AfterCompile = 5, AfterCompile = 5,
ScriptCollected = 6 ScriptCollected = 6,
BreakForCommand = 7
}; };
class EXPORT Debug { class EXPORT Debug {
public: public:
/** /**
* A client object passed to the v8 debugger whose ownership will be take n by * A client object passed to the v8 debugger whose ownership will be take n by
* it. v8 is always responsible for deleting the object. * it. v8 is always responsible for deleting the object.
*/ */
class ClientData { class ClientData {
public: public:
skipping to change at line 171 skipping to change at line 172
* 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 it's own context which is entered at this point. * running in it's own context which is entered at this point.
*/ */
virtual Handle<Context> GetEventContext() const = 0; virtual Handle<Context> GetEventContext() const = 0;
/** /**
* Client data passed with the corresponding callbak whet it was regist ered. * Client data passed with the corresponding callbak whet it was regist ered.
*/ */
virtual Handle<Value> GetCallbackData() const = 0; virtual Handle<Value> GetCallbackData() const = 0;
/**
* Client data passed to DebugBreakForCommand function. The
* debugger takes ownership of the data and will delete it even if
* there is no message handler.
*/
virtual ClientData* GetClientData() const = 0;
virtual ~EventDetails() {} virtual ~EventDetails() {}
}; };
/** /**
* Debug event callback function. * Debug event callback function.
* *
* \param event the type of the debug event that triggered the callback * \param event the type of the debug event that triggered the callback
* (enum DebugEvent) * (enum DebugEvent)
* \param exec_state execution state (JavaScript object) * \param exec_state execution state (JavaScript object)
* \param event_data event specific data (JavaScript object) * \param event_data event specific data (JavaScript object)
skipping to change at line 246 skipping to change at line 254
static bool SetDebugEventListener2(EventCallback2 that, static bool SetDebugEventListener2(EventCallback2 that,
Handle<Value> data = Handle<Value>()); Handle<Value> data = Handle<Value>());
// Set a JavaScript debug event listener. // Set a JavaScript debug event listener.
static bool SetDebugEventListener(v8::Handle<v8::Object> that, static bool SetDebugEventListener(v8::Handle<v8::Object> that,
Handle<Value> data = Handle<Value>()); Handle<Value> data = Handle<Value>());
// Break execution of JavaScript. // Break execution of JavaScript.
static void DebugBreak(); static void DebugBreak();
// Break execution of JavaScript (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
// EventCallback at the moment when the VM actually stops.
static void DebugBreakForCommand(ClientData* data = NULL);
// Message based interface. The message protocol is JSON. NOTE the messag e // Message based interface. The message protocol is JSON. NOTE the messag e
// handler thread is not supported any more parameter must be false. // handler thread is not supported any more parameter must be false.
static void SetMessageHandler(MessageHandler handler, static void SetMessageHandler(MessageHandler handler,
bool message_handler_thread = false); bool message_handler_thread = false);
static void SetMessageHandler2(MessageHandler2 handler); static void SetMessageHandler2(MessageHandler2 handler);
static void SendCommand(const uint16_t* command, int length, static void SendCommand(const uint16_t* command, int length,
ClientData* client_data = NULL); ClientData* client_data = NULL);
// Dispatch interface. // Dispatch interface.
static void SetHostDispatchHandler(HostDispatchHandler handler, static void SetHostDispatchHandler(HostDispatchHandler handler,
 End of changes. 3 change blocks. 
1 lines changed or deleted 15 lines changed or added


 v8-profiler.h   v8-profiler.h 
skipping to change at line 182 skipping to change at line 182
/** /**
* 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.
*/ */
static const CpuProfile* StopProfiling( static const CpuProfile* StopProfiling(
Handle<String> title, Handle<String> title,
Handle<Value> security_token = Handle<Value>()); Handle<Value> security_token = Handle<Value>());
}; };
class HeapGraphNode;
/**
* HeapSnapshotEdge represents a directed connection between heap
* graph nodes: from retaners to retained nodes.
*/
class V8EXPORT HeapGraphEdge {
public:
enum Type {
CONTEXT_VARIABLE = 0, // A variable from a function context.
ELEMENT = 1, // An element of an array.
PROPERTY = 2, // A named object property.
INTERNAL = 3 // A link that can't be accessed from JS,
// thus, its name isn't a real property name.
};
/** Returns edge type (see HeapGraphEdge::Type). */
Type GetType() const;
/**
* Returns edge name. This can be a variable name, an element index, or
* a property name.
*/
Handle<Value> GetName() const;
/** Returns origin node. */
const HeapGraphNode* GetFromNode() const;
/** Returns destination node. */
const HeapGraphNode* GetToNode() const;
};
class V8EXPORT HeapGraphPath {
public:
/** Returns the number of edges in the path. */
int GetEdgesCount() const;
/** Returns an edge from the path. */
const HeapGraphEdge* GetEdge(int index) const;
/** Returns origin node. */
const HeapGraphNode* GetFromNode() const;
/** Returns destination node. */
const HeapGraphNode* GetToNode() const;
};
/**
* HeapGraphNode represents a node in a heap graph.
*/
class V8EXPORT HeapGraphNode {
public:
enum Type {
INTERNAL = 0, // Internal node, a virtual one, for housekeeping.
ARRAY = 1, // An array of elements.
STRING = 2, // A string.
OBJECT = 3, // A JS object (except for arrays and strings).
CODE = 4, // Compiled code.
CLOSURE = 5 // Function closure.
};
/** Returns node type (see HeapGraphNode::Type). */
Type GetType() const;
/**
* Returns node name. Depending on node's type this can be the name
* of the constructor (for objects), the name of the function (for
* closures), string value, or an empty string (for compiled code).
*/
Handle<String> GetName() const;
/** Returns node's own size, in bytes. */
int GetSelfSize() const;
/** Returns node's network (self + reachable nodes) size, in bytes. */
int GetTotalSize() const;
/**
* Returns node's private size, in bytes. That is, the size of memory
* that will be reclaimed having this node collected.
*/
int GetPrivateSize() const;
/** Returns child nodes count of the node. */
int GetChildrenCount() const;
/** Retrieves a child by index. */
const HeapGraphEdge* GetChild(int index) const;
/** Returns retainer nodes count of the node. */
int GetRetainersCount() const;
/** Returns a retainer by index. */
const HeapGraphEdge* GetRetainer(int index) const;
/** Returns the number of simple retaining paths from the root to the nod
e. */
int GetRetainingPathsCount() const;
/** Returns a retaining path by index. */
const HeapGraphPath* GetRetainingPath(int index) const;
};
/**
* HeapSnapshots record the state of the JS heap at some moment.
*/
class V8EXPORT HeapSnapshot {
public:
/** Returns heap snapshot UID (assigned by the profiler.) */
unsigned GetUid() const;
/** Returns heap snapshot title. */
Handle<String> GetTitle() const;
/** Returns the root node of the heap graph. */
const HeapGraphNode* GetHead() const;
};
/**
* Interface for controlling heap profiling.
*/
class V8EXPORT HeapProfiler {
public:
/** Returns the number of snapshots taken. */
static int GetSnapshotsCount();
/** Returns a snapshot by index. */
static const HeapSnapshot* GetSnapshot(int index);
/** Returns a profile by uid. */
static const HeapSnapshot* FindSnapshot(unsigned uid);
/** Takes a heap snapshot and returns it. Title may be an empty string. *
/
static const HeapSnapshot* TakeSnapshot(Handle<String> title);
};
} // namespace v8 } // namespace v8
#undef V8EXPORT #undef V8EXPORT
#endif // V8_V8_PROFILER_H_ #endif // V8_V8_PROFILER_H_
 End of changes. 1 change blocks. 
0 lines changed or deleted 137 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/