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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.h

Issue 1769273004: Remove V8RecrusionScope, cleanup call sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #ifndef JavaScriptCallFrame_h 31 #ifndef JavaScriptCallFrame_h
32 #define JavaScriptCallFrame_h 32 #define JavaScriptCallFrame_h
33 33
34 #include "wtf/PassOwnPtr.h" 34 #include "wtf/PassOwnPtr.h"
35 #include "wtf/text/WTFString.h" 35 #include "wtf/text/WTFString.h"
36 #include <v8.h> 36 #include <v8.h>
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class V8DebuggerClient;
41
42 class JavaScriptCallFrame { 40 class JavaScriptCallFrame {
43 public: 41 public:
44 static PassOwnPtr<JavaScriptCallFrame> create(V8DebuggerClient* client, v8:: Local<v8::Context> debuggerContext, v8::Local<v8::Object> callFrame) 42 static PassOwnPtr<JavaScriptCallFrame> create(v8::Local<v8::Context> debugge rContext, v8::Local<v8::Object> callFrame)
45 { 43 {
46 return adoptPtr(new JavaScriptCallFrame(client, debuggerContext, callFra me)); 44 return adoptPtr(new JavaScriptCallFrame(debuggerContext, callFrame));
47 } 45 }
48 ~JavaScriptCallFrame(); 46 ~JavaScriptCallFrame();
49 47
50 PassOwnPtr<JavaScriptCallFrame> caller(); 48 PassOwnPtr<JavaScriptCallFrame> caller();
51 49
52 int sourceID() const; 50 int sourceID() const;
53 int line() const; 51 int line() const;
54 int column() const; 52 int column() const;
55 String scriptName() const; 53 String scriptName() const;
56 String functionName() const; 54 String functionName() const;
(...skipping 13 matching lines...) Expand all
70 v8::Local<v8::Value> evaluateWithExceptionDetails(v8::Local<v8::Value> expre ssion, v8::Local<v8::Value> scopeExtension); 68 v8::Local<v8::Value> evaluateWithExceptionDetails(v8::Local<v8::Value> expre ssion, v8::Local<v8::Value> scopeExtension);
71 v8::MaybeLocal<v8::Value> restart(); 69 v8::MaybeLocal<v8::Value> restart();
72 v8::MaybeLocal<v8::Value> setVariableValue(int scopeNumber, v8::Local<v8::Va lue> variableName, v8::Local<v8::Value> newValue); 70 v8::MaybeLocal<v8::Value> setVariableValue(int scopeNumber, v8::Local<v8::Va lue> variableName, v8::Local<v8::Value> newValue);
73 71
74 static v8::Local<v8::Object> createExceptionDetails(v8::Isolate*, v8::Local< v8::Message>); 72 static v8::Local<v8::Object> createExceptionDetails(v8::Isolate*, v8::Local< v8::Message>);
75 73
76 // FIXME: store this template in per isolate data 74 // FIXME: store this template in per isolate data
77 void setWrapperTemplate(v8::Local<v8::FunctionTemplate> wrapperTemplate, v8: :Isolate* isolate) { m_wrapperTemplate.Reset(isolate, wrapperTemplate); } 75 void setWrapperTemplate(v8::Local<v8::FunctionTemplate> wrapperTemplate, v8: :Isolate* isolate) { m_wrapperTemplate.Reset(isolate, wrapperTemplate); }
78 v8::Local<v8::FunctionTemplate> wrapperTemplate(v8::Isolate* isolate) { retu rn v8::Local<v8::FunctionTemplate>::New(isolate, m_wrapperTemplate); } 76 v8::Local<v8::FunctionTemplate> wrapperTemplate(v8::Isolate* isolate) { retu rn v8::Local<v8::FunctionTemplate>::New(isolate, m_wrapperTemplate); }
79 77
80 V8DebuggerClient* client() { return m_client; }
81
82 private: 78 private:
83 JavaScriptCallFrame(V8DebuggerClient*, v8::Local<v8::Context> debuggerContex t, v8::Local<v8::Object> callFrame); 79 JavaScriptCallFrame(v8::Local<v8::Context> debuggerContext, v8::Local<v8::Ob ject> callFrame);
84 80
85 int callV8FunctionReturnInt(const char* name) const; 81 int callV8FunctionReturnInt(const char* name) const;
86 String callV8FunctionReturnString(const char* name) const; 82 String callV8FunctionReturnString(const char* name) const;
87 v8::Local<v8::Value> callScopeLocationFunction(const char* name, int scopeIn dex) const; 83 v8::Local<v8::Value> callScopeLocationFunction(const char* name, int scopeIn dex) const;
88 84
89 V8DebuggerClient* m_client;
90 v8::Isolate* m_isolate; 85 v8::Isolate* m_isolate;
91 OwnPtr<JavaScriptCallFrame> m_caller; 86 OwnPtr<JavaScriptCallFrame> m_caller;
92 v8::Global<v8::Context> m_debuggerContext; 87 v8::Global<v8::Context> m_debuggerContext;
93 v8::Global<v8::Object> m_callFrame; 88 v8::Global<v8::Object> m_callFrame;
94 v8::Global<v8::FunctionTemplate> m_wrapperTemplate; 89 v8::Global<v8::FunctionTemplate> m_wrapperTemplate;
95 }; 90 };
96 91
97 } // namespace blink 92 } // namespace blink
98 93
99 #endif // JavaScriptCallFrame_h 94 #endif // JavaScriptCallFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698