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

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

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.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.cpp
index 14dba693e97653e5c4ed0726e1f949a6977459ce..19653e5513a2aaba70c069f91e48021ba6a71ee0 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.cpp
@@ -18,87 +18,102 @@ V8DebuggerScript::V8DebuggerScript()
{
}
+V8DebuggerScript::~V8DebuggerScript()
+{
+}
+
String16 V8DebuggerScript::sourceURL() const
{
return m_sourceURL.isEmpty() ? m_url : m_sourceURL;
}
-V8DebuggerScript& V8DebuggerScript::setURL(const String16& url)
+v8::Local<v8::String> V8DebuggerScript::source(v8::Isolate* isolate) const
+{
+ return m_source.Get(isolate);
+}
+
+V8DebuggerScript* V8DebuggerScript::setScriptId(const String16& id)
+{
+ m_id = id;
+ return this;
+}
+
+V8DebuggerScript* V8DebuggerScript::setURL(const String16& url)
{
m_url = url;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setSourceURL(const String16& sourceURL)
+V8DebuggerScript* V8DebuggerScript::setSourceURL(const String16& sourceURL)
{
m_sourceURL = sourceURL;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setSourceMappingURL(const String16& sourceMappingURL)
+V8DebuggerScript* V8DebuggerScript::setSourceMappingURL(const String16& sourceMappingURL)
{
m_sourceMappingURL = sourceMappingURL;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setSource(const String16& source)
+V8DebuggerScript* V8DebuggerScript::setSource(v8::Isolate* isolate, v8::Local<v8::String> source)
{
- m_source = source;
- return *this;
+ m_source.Reset(isolate, source);
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setHash(const String16& hash)
+V8DebuggerScript* V8DebuggerScript::setHash(const String16& hash)
{
m_hash = hash;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setStartLine(int startLine)
+V8DebuggerScript* V8DebuggerScript::setStartLine(int startLine)
{
m_startLine = startLine;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setStartColumn(int startColumn)
+V8DebuggerScript* V8DebuggerScript::setStartColumn(int startColumn)
{
m_startColumn = startColumn;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setEndLine(int endLine)
+V8DebuggerScript* V8DebuggerScript::setEndLine(int endLine)
{
m_endLine = endLine;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setEndColumn(int endColumn)
+V8DebuggerScript* V8DebuggerScript::setEndColumn(int endColumn)
{
m_endColumn = endColumn;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setExecutionContextId(int executionContextId)
+V8DebuggerScript* V8DebuggerScript::setExecutionContextId(int executionContextId)
{
m_executionContextId = executionContextId;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setIsContentScript(bool isContentScript)
+V8DebuggerScript* V8DebuggerScript::setIsContentScript(bool isContentScript)
{
m_isContentScript = isContentScript;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setIsInternalScript(bool isInternalScript)
+V8DebuggerScript* V8DebuggerScript::setIsInternalScript(bool isInternalScript)
{
m_isInternalScript = isInternalScript;
- return *this;
+ return this;
}
-V8DebuggerScript& V8DebuggerScript::setIsLiveEdit(bool isLiveEdit)
+V8DebuggerScript* V8DebuggerScript::setIsLiveEdit(bool isLiveEdit)
{
m_isLiveEdit = isLiveEdit;
- return *this;
+ return this;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698