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

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: 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..2aa4e4847ca26e8021f07de69dce3ab5ded3262f 100644
--- a/third_party/WebKit/Source/core/inspector/InjectedScript.h
+++ b/third_party/WebKit/Source/core/inspector/InjectedScript.h
@@ -48,14 +48,11 @@ class ScriptFunctionCall;
typedef String ErrorString;
PassRefPtr<JSONValue> toJSONValue(const ScriptValue&);
-
class InjectedScript final {
- DISALLOW_NEW();
sof 2016/01/24 08:05:32 USING_FAST_MALLOC(InjectedScript); ?
sof 2016/01/25 18:59:12 Not following up on this one?
pfeldman 2016/01/25 19:02:41 I absolutely have to! Why allocating this rare obj
public:
InjectedScript();
~InjectedScript();
- bool isEmpty() const { return m_injectedScriptObject.isEmpty(); }
ScriptState* scriptState() const
{
ASSERT(!isEmpty());
@@ -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