Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1164)

Unified Diff: Source/core/inspector/JavaScriptCallFrame.h

Issue 1161323002: DevTools: implement JavaScriptCallFrame binding based on v8 API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved V8JavaScriptCallFrame to bindings/core/v8/inspector/ Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.cpp ('k') | Source/core/inspector/JavaScriptCallFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/JavaScriptCallFrame.h
diff --git a/Source/core/inspector/JavaScriptCallFrame.h b/Source/core/inspector/JavaScriptCallFrame.h
index 03ac404fa7d59ce51c2ee6d7c05749b364fefdd4..50ac0e26669ab7b6587888ca84f0adc9f30019eb 100644
--- a/Source/core/inspector/JavaScriptCallFrame.h
+++ b/Source/core/inspector/JavaScriptCallFrame.h
@@ -34,22 +34,19 @@
#include "bindings/core/v8/ScopedPersistent.h"
#include "bindings/core/v8/ScriptState.h"
-#include "bindings/core/v8/ScriptWrappable.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
#include <v8.h>
namespace blink {
-class JavaScriptCallFrame : public RefCountedWillBeGarbageCollectedFinalized<JavaScriptCallFrame>, public ScriptWrappable {
- DEFINE_WRAPPERTYPEINFO();
+class JavaScriptCallFrame : public RefCounted<JavaScriptCallFrame> {
public:
static PassRefPtrWillBeRawPtr<JavaScriptCallFrame> create(v8::Local<v8::Context> debuggerContext, v8::Local<v8::Object> callFrame)
{
return adoptRefWillBeNoop(new JavaScriptCallFrame(debuggerContext, callFrame));
}
~JavaScriptCallFrame();
- DECLARE_TRACE();
JavaScriptCallFrame* caller();
@@ -74,6 +71,10 @@ public:
static v8::Local<v8::Object> createExceptionDetails(v8::Isolate*, v8::Local<v8::Message>);
+ // FIXME: store this template in per isolate data
+ void setWrapperTemplate(v8::Local<v8::FunctionTemplate> wrapperTemplate, v8::Isolate* isolate) { m_wrapperTemplate.Reset(isolate, wrapperTemplate); }
+ v8::Local<v8::FunctionTemplate> wrapperTemplate(v8::Isolate* isolate) { return v8::Local<v8::FunctionTemplate>::New(isolate, m_wrapperTemplate); }
+
private:
JavaScriptCallFrame(v8::Local<v8::Context> debuggerContext, v8::Local<v8::Object> callFrame);
@@ -84,6 +85,7 @@ private:
RefPtrWillBeMember<JavaScriptCallFrame> m_caller;
ScopedPersistent<v8::Context> m_debuggerContext;
ScopedPersistent<v8::Object> m_callFrame;
+ v8::Global<v8::FunctionTemplate> m_wrapperTemplate;
};
} // namespace blink
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.cpp ('k') | Source/core/inspector/JavaScriptCallFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698