summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/js
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-07-08 12:51:48 +0100
committerSteve Block <steveblock@google.com>2010-07-09 15:33:40 +0100
commitca9cb53ed1119a3fd98fafa0972ffeb56dee1c24 (patch)
treebb45155550ec013adc0ad10f4d7d354c6469b022 /WebKit/chromium/src/js
parentd4b24d9a829ed7de70381c8b99fb75a07ab40466 (diff)
downloadexternal_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.zip
external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.gz
external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.bz2
Merge WebKit at r62496: Initial merge by git
Change-Id: Ie3da0770eca22a70a632e3571f31cfabc80facb2
Diffstat (limited to 'WebKit/chromium/src/js')
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js28
-rw-r--r--WebKit/chromium/src/js/DevToolsHostStub.js5
-rw-r--r--WebKit/chromium/src/js/Tests.js18
3 files changed, 34 insertions, 17 deletions
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index baddb7d..25d1903 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -93,22 +93,19 @@ DebuggerScript._formatScript = function(script)
DebuggerScript.setBreakpoint = function(execState, args)
{
args.lineNumber = DebuggerScript._webkitToV8LineNumber(args.lineNumber);
- var key = args.scriptId + ":" + args.lineNumber;
- var breakId = DebuggerScript._breakpoints[key];
- if (breakId) {
- if (args.enabled)
- Debug.enableScriptBreakPoint(breakId);
- else
- Debug.disableScriptBreakPoint(breakId);
- Debug.changeScriptBreakPointCondition(breakId, args.condition);
- return breakId;
- }
-
- breakId = Debug.setScriptBreakPointById(args.scriptId, args.lineNumber, 0 /* column */, args.condition);
- DebuggerScript._breakpoints[key] = breakId;
+ var breakId = Debug.setScriptBreakPointById(args.scriptId, args.lineNumber, 0 /* column */, args.condition);
if (!args.enabled)
Debug.disableScriptBreakPoint(breakId);
- return breakId;
+
+ var actualLineNumber = args.lineNumber; // TODO: replace with real stuff after v8 roll.
+
+ var key = args.scriptId + ":" + actualLineNumber;
+ if (key in DebuggerScript._breakpoints) {
+ // Remove old breakpoint.
+ Debug.findBreakPoint(DebuggerScript._breakpoints[key], true);
+ }
+ DebuggerScript._breakpoints[key] = breakId;
+ return DebuggerScript._v8ToWebkitLineNumber(actualLineNumber);
}
DebuggerScript.removeBreakpoint = function(execState, args)
@@ -240,6 +237,9 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
var scopeObject = {};
for (var j = 0; j < properties.length; j++)
scopeObject[properties[j].name()] = properties[j].value_;
+ // Reset scope object prototype to null so that the proto properties
+ // don't appear in th local scope section.
+ scopeObject.__proto__ = null;
scopeType.push(scopeMirror.scopeType());
scopeChain.push(scopeObject);
}
diff --git a/WebKit/chromium/src/js/DevToolsHostStub.js b/WebKit/chromium/src/js/DevToolsHostStub.js
index 806bf6a..bab73a9 100644
--- a/WebKit/chromium/src/js/DevToolsHostStub.js
+++ b/WebKit/chromium/src/js/DevToolsHostStub.js
@@ -37,5 +37,8 @@ if (!window["RemoteDebuggerAgent"]) {
window["RemoteDebuggerAgent"] = { setDebuggerScriptSource: function() {} };
window["RemoteDebuggerCommandExecutor"] = {};
window["RemoteProfilerAgent"] = {};
- window["RemoteToolsAgent"] = { dispatchOnInjectedScript: function() {} };
+ window["RemoteToolsAgent"] = {
+ dispatchOnInjectedScript: function() {},
+ dispatchOnInspectorController: function() {}
+ };
}
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 893bc56..cd4d9fb 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -1610,7 +1610,21 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
if (window.v8ScriptDebugServerEnabled) {
var scopeExpectations = [
"a", "Child", [
- "constructor", "function Child(n) {", null,
+ "__proto__", "Child", [
+ "__proto__", "Parent", [
+ "__proto__", "Object", null,
+ "constructor", "function Parent(n) {", [
+ "name", '"Parent"', null,
+ "prototype", 'Parent', [
+ "parentProtoField", "11", null,
+ ]
+ ],
+ "parentProtoField", "11", null,
+ ],
+ "constructor", "function Child(n) {", null,
+ "childProtoField", "21", null,
+ ],
+
"parentField", "10", null,
"childField", "20", null,
]
@@ -1655,7 +1669,7 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
var propQueue = [];
var index = 0;
- var expectedFinalIndex = (window.v8ScriptDebugServerEnabled ? 1 : 8);
+ var expectedFinalIndex = (window.v8ScriptDebugServerEnabled ? 5 : 8);
function expandAndCheckNextProperty() {
if (index === propQueue.length) {