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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js

Issue 2112673003: [DevTools] Move suspended generator location to internal properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 5 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/DebuggerScript.js
diff --git a/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js b/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
index 85d214e06efad6011204e3e9974bf4fca7dea040..5b534f322160f330c555e8ce17f66dfc8c3454ea 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
@@ -92,9 +92,9 @@ DebuggerScript.getFunctionScopes = function(fun)
/**
* @param {Object} object
- * @return {?GeneratorObjectDetails}
+ * @return {?RawLocation}
*/
-DebuggerScript.getGeneratorObjectDetails = function(object)
+DebuggerScript.getGeneratorObjectLocation = function(object)
{
var mirror = MakeMirror(object, true /* transient */);
if (!mirror.isGenerator())
@@ -103,21 +103,16 @@ DebuggerScript.getGeneratorObjectDetails = function(object)
var funcMirror = generatorMirror.func();
if (!funcMirror.resolved())
return null;
- var result = {
- "function": funcMirror.value(),
- "functionName": funcMirror.debugName(),
- "status": generatorMirror.status()
- };
- var script = funcMirror.script();
var location = generatorMirror.sourceLocation() || funcMirror.sourceLocation();
+ var script = funcMirror.script();
if (script && location) {
- result["location"] = {
- "scriptId": String(script.id()),
- "lineNumber": location.line,
- "columnNumber": location.column
+ return {
+ scriptId: "" + script.id(),
+ lineNumber: location.line,
+ columnNumber: location.column
};
}
- return result;
+ return null;
}
/**

Powered by Google App Engine
This is Rietveld 408576698