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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.h

Issue 2104063002: [DevTools] Store script source in v8::Global. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/platform/v8_inspector/V8DebuggerScript.h
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.h b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.h
index 55080be0dacea7de7e7ecace112938e101f53063..304d26dad77e558b474d54d0e22cd9f6ff90f534 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.h
@@ -37,15 +37,17 @@
namespace blink {
class V8DebuggerScript {
- PROTOCOL_DISALLOW_NEW();
+ PROTOCOL_DISALLOW_COPY(V8DebuggerScript);
public:
V8DebuggerScript();
+ ~V8DebuggerScript();
+ String16 scriptId() const { return m_id; }
String16 url() const { return m_url; }
bool hasSourceURL() const { return !m_sourceURL.isEmpty(); }
String16 sourceURL() const;
String16 sourceMappingURL() const { return m_sourceMappingURL; }
- String16 source() const { return m_source; }
+ v8::Local<v8::String> source(v8::Isolate*) const;
String16 hash() const { return m_hash; }
int startLine() const { return m_startLine; }
int startColumn() const { return m_startColumn; }
@@ -56,25 +58,27 @@ public:
bool isInternalScript() const { return m_isInternalScript; }
bool isLiveEdit() const { return m_isLiveEdit; }
- V8DebuggerScript& setURL(const String16&);
- V8DebuggerScript& setSourceURL(const String16&);
- V8DebuggerScript& setSourceMappingURL(const String16&);
- V8DebuggerScript& setSource(const String16&);
- V8DebuggerScript& setHash(const String16&);
- V8DebuggerScript& setStartLine(int);
- V8DebuggerScript& setStartColumn(int);
- V8DebuggerScript& setEndLine(int);
- V8DebuggerScript& setEndColumn(int);
- V8DebuggerScript& setExecutionContextId(int);
- V8DebuggerScript& setIsContentScript(bool);
- V8DebuggerScript& setIsInternalScript(bool);
- V8DebuggerScript& setIsLiveEdit(bool);
+ V8DebuggerScript* setScriptId(const String16&);
kozy 2016/06/29 00:34:05 It looks like we use most part of this setters onl
+ V8DebuggerScript* setURL(const String16&);
+ V8DebuggerScript* setSourceURL(const String16&);
+ V8DebuggerScript* setSourceMappingURL(const String16&);
+ V8DebuggerScript* setSource(v8::Isolate*, v8::Local<v8::String>);
+ V8DebuggerScript* setHash(const String16&);
+ V8DebuggerScript* setStartLine(int);
+ V8DebuggerScript* setStartColumn(int);
+ V8DebuggerScript* setEndLine(int);
+ V8DebuggerScript* setEndColumn(int);
+ V8DebuggerScript* setExecutionContextId(int);
+ V8DebuggerScript* setIsContentScript(bool);
+ V8DebuggerScript* setIsInternalScript(bool);
+ V8DebuggerScript* setIsLiveEdit(bool);
private:
+ String16 m_id;
String16 m_url;
String16 m_sourceURL;
String16 m_sourceMappingURL;
- String16 m_source;
+ v8::Global<v8::String> m_source;
String16 m_hash;
int m_startLine;
int m_startColumn;
@@ -86,12 +90,6 @@ private:
bool m_isLiveEdit;
};
-struct V8DebuggerParsedScript {
- String16 scriptId;
- V8DebuggerScript script;
- bool success;
-};
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698