diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/bindings/v8/DebuggerScript.js | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/bindings/v8/DebuggerScript.js')
-rw-r--r-- | Source/WebCore/bindings/v8/DebuggerScript.js | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/Source/WebCore/bindings/v8/DebuggerScript.js b/Source/WebCore/bindings/v8/DebuggerScript.js index fe6e8ab..c6540d7 100644 --- a/Source/WebCore/bindings/v8/DebuggerScript.js +++ b/Source/WebCore/bindings/v8/DebuggerScript.js @@ -38,11 +38,6 @@ DebuggerScript.PauseOnExceptionsState = { PauseOnUncaughtExceptions: 2 }; -DebuggerScript.ScriptWorldType = { - MainWorld : 0, - ExtensionsWorld : 1 -}; - DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.DontPauseOnExceptions; Debug.clearBreakOnException(); Debug.clearBreakOnUncaughtException(); @@ -52,6 +47,21 @@ DebuggerScript.getAfterCompileScript = function(eventData) return DebuggerScript._formatScript(eventData.script_.script_); } +DebuggerScript.getWorkerScripts = function() +{ + var result = []; + var scripts = Debug.scripts(); + for (var i = 0; i < scripts.length; ++i) { + var script = scripts[i]; + // Workers don't share same V8 heap now so there is no need to complicate stuff with + // the context id like we do to discriminate between scripts from different pages. + // However we need to filter out v8 native scripts. + if (script.context_data && script.context_data === "worker") + result.push(DebuggerScript._formatScript(script)); + } + return result; +} + DebuggerScript.getScripts = function(contextData) { var result = []; @@ -76,24 +86,19 @@ DebuggerScript.getScripts = function(contextData) DebuggerScript._formatScript = function(script) { - var scriptWorldType = DebuggerScript.ScriptWorldType.MainWorld; - if (script.context_data && script.context_data.indexOf("injected") == 0) - scriptWorldType = DebuggerScript.ScriptWorldType.ExtensionsWorld; return { id: script.id, name: script.nameOrSourceURL(), source: script.source, lineOffset: script.line_offset, columnOffset: script.column_offset, - scriptWorldType: scriptWorldType + isContentScript: !!script.context_data && script.context_data.indexOf("injected") == 0 }; } DebuggerScript.setBreakpoint = function(execState, args) { - var breakId = Debug.setScriptBreakPointById(args.scriptId, args.lineNumber, args.columnNumber, args.condition); - if (!args.enabled) - Debug.disableScriptBreakPoint(breakId); + var breakId = Debug.setScriptBreakPointById(args.sourceID, args.lineNumber, args.columnNumber, args.condition); var locations = Debug.findBreakPointActualLocations(breakId); if (!locations.length) @@ -252,7 +257,6 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame) "line": location.line, "column": location.column, "functionName": functionName, - "type": "function", "thisObject": thisObject, "scopeChain": scopeChain, "scopeType": scopeType, |