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

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

Issue 1836653002: [DevTools] Wrap call frame with its injected script instead top injected script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compile-debugger-script
Patch Set: Created 4 years, 8 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void wrapEvaluateResult(ErrorString*, 86 void wrapEvaluateResult(ErrorString*,
87 v8::MaybeLocal<v8::Value> maybeResultValue, 87 v8::MaybeLocal<v8::Value> maybeResultValue,
88 const v8::TryCatch&, 88 const v8::TryCatch&,
89 const String16& objectGroup, 89 const String16& objectGroup,
90 bool returnByValue, 90 bool returnByValue,
91 bool generatePreview, 91 bool generatePreview,
92 OwnPtr<protocol::Runtime::RemoteObject>* result, 92 OwnPtr<protocol::Runtime::RemoteObject>* result,
93 Maybe<bool>* wasThrown, 93 Maybe<bool>* wasThrown,
94 Maybe<protocol::Runtime::ExceptionDetails>*); 94 Maybe<protocol::Runtime::ExceptionDetails>*);
95 95
96 class ScopedGlobalObjectExtension {
97 PROTOCOL_DISALLOW_COPY(ScopedGlobalObjectExtension);
98 public:
99 ScopedGlobalObjectExtension(InjectedScript* current, v8::MaybeLocal<v8:: Object> extension);
100 ~ScopedGlobalObjectExtension();
101
102 private:
103 v8::Local<v8::Symbol> m_symbol;
104 v8::Local<v8::Context> m_context;
105 v8::MaybeLocal<v8::Object> m_global;
106 };
107
96 private: 108 private:
97 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>); 109 friend InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8 ::Context>);
98 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, PassOwnPtr<InjectedScriptNative>, int contextId); 110 InjectedScript(InjectedScriptManager*, v8::Local<v8::Context>, v8::Local<v8: :Object>, PassOwnPtr<InjectedScriptNative>, int contextId);
99 111
100 v8::Local<v8::Value> v8Value() const; 112 v8::Local<v8::Value> v8Value() const;
101 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const; 113 v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadE xception) const;
102 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&); 114 PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&);
103 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*); 115 PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Ma ybe<protocol::Runtime::ExceptionDetails>*);
104 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons t String16& groupName, bool forceValueType, bool generatePreview) const; 116 v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, cons t String16& groupName, bool forceValueType, bool generatePreview) const;
105 v8::MaybeLocal<v8::Object> callFunctionReturnObject(ErrorString*, V8Function Call&) const; 117 v8::MaybeLocal<v8::Object> callFunctionReturnObject(ErrorString*, V8Function Call&) const;
106 118
107 InjectedScriptManager* m_manager; 119 InjectedScriptManager* m_manager;
108 v8::Isolate* m_isolate; 120 v8::Isolate* m_isolate;
109 v8::Global<v8::Context> m_context; 121 v8::Global<v8::Context> m_context;
110 v8::Global<v8::Value> m_value; 122 v8::Global<v8::Value> m_value;
111 OwnPtr<InjectedScriptNative> m_native; 123 OwnPtr<InjectedScriptNative> m_native;
112 int m_contextId; 124 int m_contextId;
113 String16 m_origin; 125 String16 m_origin;
114 }; 126 };
115 127
116 } // namespace blink 128 } // namespace blink
117 129
118 #endif 130 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698