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

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

Issue 1804043002: Revert of 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 23 matching lines...) Expand all
34 #include "platform/inspector_protocol/TypeBuilder.h" 34 #include "platform/inspector_protocol/TypeBuilder.h"
35 #include "platform/v8_inspector/InjectedScriptManager.h" 35 #include "platform/v8_inspector/InjectedScriptManager.h"
36 #include "platform/v8_inspector/InjectedScriptNative.h" 36 #include "platform/v8_inspector/InjectedScriptNative.h"
37 #include <v8.h> 37 #include <v8.h>
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class InjectedScriptManager; 41 class InjectedScriptManager;
42 class RemoteObjectId; 42 class RemoteObjectId;
43 class V8FunctionCall; 43 class V8FunctionCall;
44 class V8DebuggerClient;
44 45
45 namespace protocol { 46 namespace protocol {
46 class DictionaryValue; 47 class DictionaryValue;
47 } 48 }
48 49
49 50
50 using protocol::Maybe; 51 using protocol::Maybe;
51 52
52 class InjectedScript final { 53 class InjectedScript final {
53 public: 54 public:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 int contextId() { return m_contextId; } 107 int contextId() { return m_contextId; }
107 String16 origin() const { return m_origin; } 108 String16 origin() const { return m_origin; }
108 void setOrigin(const String16& origin) { m_origin = origin; } 109 void setOrigin(const String16& origin) { m_origin = origin; }
109 110
110 v8::Isolate* isolate() { return m_isolate; } 111 v8::Isolate* isolate() { return m_isolate; }
111 v8::Local<v8::Context> context() const; 112 v8::Local<v8::Context> context() const;
112 void dispose(); 113 void dispose();
113 114
114 private: 115 private:
115 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>); 116 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>);
116 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, PassOwnPtr<InjectedScriptNative>, int contextId); 117 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, V8DebuggerClient*, PassOwnPtr<InjectedScriptNative>, int contextId);
117 118
118 bool canAccessInspectedWindow() const; 119 bool canAccessInspectedWindow() const;
119 v8::Local<v8::Value> v8Value() const; 120 v8::Local<v8::Value> v8Value() const;
120 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const; 121 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const;
121 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); 122 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&);
122 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun ctionCall&, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* = 0); 123 PassOwnPtr<protocol::Runtime::RemoteObject> makeEvalCall(ErrorString*, V8Fun ctionCall&, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* = 0);
123 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*); 124 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*);
124 125
125 InjectedScriptManager* m_manager; 126 InjectedScriptManager* m_manager;
126 v8::Isolate* m_isolate; 127 v8::Isolate* m_isolate;
127 v8::Global<v8::Context> m_context; 128 v8::Global<v8::Context> m_context;
128 v8::Global<v8::Value> m_value; 129 v8::Global<v8::Value> m_value;
130 V8DebuggerClient* m_client;
129 OwnPtr<InjectedScriptNative> m_native; 131 OwnPtr<InjectedScriptNative> m_native;
130 int m_contextId; 132 int m_contextId;
131 String16 m_origin; 133 String16 m_origin;
132 }; 134 };
133 135
134 } // namespace blink 136 } // namespace blink
135 137
136 #endif 138 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698