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

Unified Diff: third_party/WebKit/Source/core/inspector/InjectedScript.h

Issue 1622213002: DevTools: make InjectedScript heap-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed protocol tests. Created 4 years, 11 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
Index: third_party/WebKit/Source/core/inspector/InjectedScript.h
diff --git a/third_party/WebKit/Source/core/inspector/InjectedScript.h b/third_party/WebKit/Source/core/inspector/InjectedScript.h
index 05315254c3652796ace771577b51e96942eceb0d..62218e22bae53513953a42f3eeab9338bcd0cdb9 100644
--- a/third_party/WebKit/Source/core/inspector/InjectedScript.h
+++ b/third_party/WebKit/Source/core/inspector/InjectedScript.h
@@ -48,17 +48,14 @@ class ScriptFunctionCall;
typedef String ErrorString;
PassRefPtr<JSONValue> toJSONValue(const ScriptValue&);
-
class InjectedScript final {
- DISALLOW_NEW();
+ USING_FAST_MALLOC(InjectedScript);
public:
InjectedScript();
~InjectedScript();
- bool isEmpty() const { return m_injectedScriptObject.isEmpty(); }
ScriptState* scriptState() const
{
- ASSERT(!isEmpty());
return m_injectedScriptObject.scriptState();
}
@@ -117,7 +114,7 @@ public:
int contextId() { return m_contextId; }
private:
- friend InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState*);
+ friend InjectedScript* InjectedScriptManager::injectedScriptFor(ScriptState*);
using InspectedStateAccessCheck = bool (*)(ScriptState*);
InjectedScript(ScriptValue, InspectedStateAccessCheck, PassRefPtr<InjectedScriptNative>, int contextId);

Powered by Google App Engine
This is Rietveld 408576698