Diff
Modified: trunk/LayoutTests/ChangeLog (193424 => 193425)
--- trunk/LayoutTests/ChangeLog 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/LayoutTests/ChangeLog 2015-12-04 18:49:47 UTC (rev 193425)
@@ -1,3 +1,16 @@
+2015-12-04 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Specifically Identify the Global Lexical Environment Scope
+ https://bugs.webkit.org/show_bug.cgi?id=151828
+
+ Reviewed by Brian Burg.
+
+ * inspector/debugger/breakpoint-scope-expected.txt:
+ * inspector/debugger/breakpoint-scope.html:
+ * inspector/debugger/resources/scope.js:
+ Update the test to include something in the global lexical
+ environment and ensure it is identified as such.
+
2015-12-03 Sergio Villar Senin <svil...@igalia.com>
[css-grid] Fix height computation of grid items with borders inside fr tracks
Modified: trunk/LayoutTests/inspector/debugger/breakpoint-scope-expected.txt (193424 => 193425)
--- trunk/LayoutTests/inspector/debugger/breakpoint-scope-expected.txt 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-scope-expected.txt 2015-12-04 18:49:47 UTC (rev 193425)
@@ -1,13 +1,15 @@
-CONSOLE MESSAGE: line 1: Paused at line: 2, column: 8
+CONSOLE MESSAGE: line 1: Paused at line: 4, column: 8
Testing that we can access scope in various functions.
Starting Test
-Hit breakpoint at line: 2, column: 8
+Hit breakpoint at line: 4, column: 8
scope-chain-type-local properties:
resolve
reject
scope-chain-type-closure properties:
p
+scope-chain-type-globalLexicalEnvironment properties:
+ lexicalVariable
scope-chain-type-global (properties not listed)
Tests done
Modified: trunk/LayoutTests/inspector/debugger/breakpoint-scope.html (193424 => 193425)
--- trunk/LayoutTests/inspector/debugger/breakpoint-scope.html 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-scope.html 2015-12-04 18:49:47 UTC (rev 193425)
@@ -9,7 +9,7 @@
function test()
{
var testInfoList = [
- { line : 2, column : 8, startFunc : "testNativeScope()" }
+ { line : 4, column : 8, startFunc : "testNativeScope()" }
];
var currentTestIndex = 0;
Modified: trunk/LayoutTests/inspector/debugger/resources/scope.js (193424 => 193425)
--- trunk/LayoutTests/inspector/debugger/resources/scope.js 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/LayoutTests/inspector/debugger/resources/scope.js 2015-12-04 18:49:47 UTC (rev 193425)
@@ -1,3 +1,5 @@
+let lexicalVariable = true;
+
function testNativeScope() {
var p = new Promise(function(resolve, reject) {
debugger;
Modified: trunk/Source/_javascript_Core/ChangeLog (193424 => 193425)
--- trunk/Source/_javascript_Core/ChangeLog 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-12-04 18:49:47 UTC (rev 193425)
@@ -1,3 +1,30 @@
+2015-12-04 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Specifically Identify the Global Lexical Environment Scope
+ https://bugs.webkit.org/show_bug.cgi?id=151828
+
+ Reviewed by Brian Burg.
+
+ * inspector/InjectedScriptSource.js:
+ Include the new scope type.
+
+ * inspector/JSJavaScriptCallFrame.h:
+ * inspector/JSJavaScriptCallFrame.cpp:
+ (Inspector::JSJavaScriptCallFrame::scopeType):
+ Set the new value for the new scope type.
+
+ * inspector/JSJavaScriptCallFramePrototype.cpp:
+ (Inspector::JSJavaScriptCallFramePrototype::finishCreation): Deleted.
+ (Inspector::jsJavaScriptCallFrameConstantGLOBAL_SCOPE): Deleted.
+ (Inspector::jsJavaScriptCallFrameConstantLOCAL_SCOPE): Deleted.
+ (Inspector::jsJavaScriptCallFrameConstantWITH_SCOPE): Deleted.
+ (Inspector::jsJavaScriptCallFrameConstantCLOSURE_SCOPE): Deleted.
+ (Inspector::jsJavaScriptCallFrameConstantCATCH_SCOPE): Deleted.
+ (Inspector::jsJavaScriptCallFrameConstantFUNCTION_NAME_SCOPE): Deleted.
+ Remove unused constants on the _javascript_CallFrame object.
+ Currently they are just hardcoded in InjectedScriptSource
+ and they don't make sense on instances anyways.
+
2015-12-04 Keith Miller <keith_mil...@apple.com>
Add an option to emit instructions validating exceptions in the DFG rather than always emiting them.
Modified: trunk/Source/_javascript_Core/inspector/InjectedScriptSource.js (193424 => 193425)
--- trunk/Source/_javascript_Core/inspector/InjectedScriptSource.js 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/_javascript_Core/inspector/InjectedScriptSource.js 2015-12-04 18:49:47 UTC (rev 193425)
@@ -1368,6 +1368,7 @@
3: "closure", // CLOSURE_SCOPE
4: "catch", // CATCH_SCOPE
5: "functionName", // FUNCTION_NAME_SCOPE
+ 6: "globalLexicalEnvironment", // GLOBAL_LEXICAL_ENVIRONMENT_SCOPE
}
InjectedScript.CallFrameProxy._createScopeJson = function(scopeTypeCode, scopeObject, groupId)
Modified: trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFrame.cpp (193424 => 193425)
--- trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFrame.cpp 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFrame.cpp 2015-12-04 18:49:47 UTC (rev 193425)
@@ -113,11 +113,8 @@
return jsNumber(JSJavaScriptCallFrame::FUNCTION_NAME_SCOPE);
if (scope->isWithScope())
return jsNumber(JSJavaScriptCallFrame::WITH_SCOPE);
- if (scope->isGlobalLexicalEnvironment()) {
- // FIXME: We need a way to better describe this scope.
- // It's currently best described as a "closure" scope.
- return jsNumber(JSJavaScriptCallFrame::CLOSURE_SCOPE);
- }
+ if (scope->isGlobalLexicalEnvironment())
+ return jsNumber(JSJavaScriptCallFrame::GLOBAL_LEXICAL_ENVIRONMENT_SCOPE);
if (scope->isGlobalScope()) {
ASSERT(++iter == end);
return jsNumber(JSJavaScriptCallFrame::GLOBAL_SCOPE);
Modified: trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFrame.h (193424 => 193425)
--- trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFrame.h 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFrame.h 2015-12-04 18:49:47 UTC (rev 193425)
@@ -77,6 +77,7 @@
static const unsigned short CLOSURE_SCOPE = 3;
static const unsigned short CATCH_SCOPE = 4;
static const unsigned short FUNCTION_NAME_SCOPE = 5;
+ static const unsigned short GLOBAL_LEXICAL_ENVIRONMENT_SCOPE = 6;
protected:
void finishCreation(JSC::VM&);
Modified: trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFramePrototype.cpp (193424 => 193425)
--- trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFramePrototype.cpp 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFramePrototype.cpp 2015-12-04 18:49:47 UTC (rev 193425)
@@ -51,14 +51,6 @@
static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameAttributeThisObject(ExecState*);
static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameAttributeType(ExecState*);
-// Constants.
-static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantGLOBAL_SCOPE(ExecState*);
-static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantLOCAL_SCOPE(ExecState*);
-static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantWITH_SCOPE(ExecState*);
-static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantCLOSURE_SCOPE(ExecState*);
-static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantCATCH_SCOPE(ExecState*);
-static EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantFUNCTION_NAME_SCOPE(ExecState*);
-
const ClassInfo JSJavaScriptCallFramePrototype::s_info = { "_javascript_CallFrame", &Base::s_info, 0, CREATE_METHOD_TABLE(JSJavaScriptCallFramePrototype) };
#define JSC_NATIVE_NON_INDEX_ACCESSOR(jsName, cppName, attributes) \
@@ -87,13 +79,6 @@
JSC_NATIVE_NON_INDEX_ACCESSOR("scopeChain", jsJavaScriptCallFrameAttributeScopeChain, DontEnum | Accessor);
JSC_NATIVE_NON_INDEX_ACCESSOR("thisObject", jsJavaScriptCallFrameAttributeThisObject, DontEnum | Accessor);
JSC_NATIVE_NON_INDEX_ACCESSOR("type", jsJavaScriptCallFrameAttributeType, DontEnum | Accessor);
-
- JSC_NATIVE_NON_INDEX_ACCESSOR("GLOBAL_SCOPE", jsJavaScriptCallFrameConstantGLOBAL_SCOPE, DontEnum | Accessor);
- JSC_NATIVE_NON_INDEX_ACCESSOR("LOCAL_SCOPE", jsJavaScriptCallFrameConstantLOCAL_SCOPE, DontEnum | Accessor);
- JSC_NATIVE_NON_INDEX_ACCESSOR("WITH_SCOPE", jsJavaScriptCallFrameConstantWITH_SCOPE, DontEnum | Accessor);
- JSC_NATIVE_NON_INDEX_ACCESSOR("CLOSURE_SCOPE", jsJavaScriptCallFrameConstantCLOSURE_SCOPE, DontEnum | Accessor);
- JSC_NATIVE_NON_INDEX_ACCESSOR("CATCH_SCOPE", jsJavaScriptCallFrameConstantCATCH_SCOPE, DontEnum | Accessor);
- JSC_NATIVE_NON_INDEX_ACCESSOR("FUNCTION_NAME_SCOPE", jsJavaScriptCallFrameConstantFUNCTION_NAME_SCOPE, DontEnum | Accessor);
}
EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFramePrototypeFunctionEvaluate(ExecState* exec)
@@ -206,34 +191,4 @@
return JSValue::encode(castedThis->type(exec));
}
-EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantGLOBAL_SCOPE(ExecState*)
-{
- return JSValue::encode(jsNumber(JSJavaScriptCallFrame::GLOBAL_SCOPE));
-}
-
-EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantLOCAL_SCOPE(ExecState*)
-{
- return JSValue::encode(jsNumber(JSJavaScriptCallFrame::LOCAL_SCOPE));
-}
-
-EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantWITH_SCOPE(ExecState*)
-{
- return JSValue::encode(jsNumber(JSJavaScriptCallFrame::WITH_SCOPE));
-}
-
-EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantCLOSURE_SCOPE(ExecState*)
-{
- return JSValue::encode(jsNumber(JSJavaScriptCallFrame::CLOSURE_SCOPE));
-}
-
-EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantCATCH_SCOPE(ExecState*)
-{
- return JSValue::encode(jsNumber(JSJavaScriptCallFrame::CATCH_SCOPE));
-}
-
-EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFrameConstantFUNCTION_NAME_SCOPE(ExecState*)
-{
- return JSValue::encode(jsNumber(JSJavaScriptCallFrame::FUNCTION_NAME_SCOPE));
-}
-
} // namespace Inspector
Modified: trunk/Source/_javascript_Core/inspector/protocol/Debugger.json (193424 => 193425)
--- trunk/Source/_javascript_Core/inspector/protocol/Debugger.json 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/_javascript_Core/inspector/protocol/Debugger.json 2015-12-04 18:49:47 UTC (rev 193425)
@@ -81,7 +81,7 @@
"id": "Scope",
"type": "object",
"properties": [
- { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "functionName"], "description": "Scope type." },
+ { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "functionName", "globalLexicalEnvironment"], "description": "Scope type." },
{ "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." }
],
"description": "Scope description."
Modified: trunk/Source/WebInspectorUI/ChangeLog (193424 => 193425)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-12-04 18:49:47 UTC (rev 193425)
@@ -1,3 +1,18 @@
+2015-12-04 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Specifically Identify the Global Lexical Environment Scope
+ https://bugs.webkit.org/show_bug.cgi?id=151828
+
+ Reviewed by Brian Burg.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Controllers/DebuggerManager.js:
+ (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
+ * UserInterface/Models/ScopeChainNode.js:
+ * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
+ (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
+ Include a new scope type and give it a localized string.
+
2015-12-03 Anders Carlsson <ander...@apple.com>
Remove Objective-C GC support
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (193424 => 193425)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-12-04 18:49:47 UTC (rev 193425)
@@ -309,6 +309,7 @@
localizedStrings["Garbage Collection"] = "Garbage Collection";
localizedStrings["Getter"] = "Getter";
localizedStrings["Global Breakpoints"] = "Global Breakpoints";
+localizedStrings["Global Lexical Environment"] = "Global Lexical Environment";
localizedStrings["Global Variables"] = "Global Variables";
localizedStrings["Grammar"] = "Grammar";
localizedStrings["Group"] = "Group";
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (193424 => 193425)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js 2015-12-04 18:49:47 UTC (rev 193425)
@@ -603,6 +603,9 @@
case "functionName":
type = WebInspector.ScopeChainNode.Type.FunctionName;
break;
+ case "globalLexicalEnvironment":
+ type = WebInspector.ScopeChainNode.Type.GlobalLexicalEnvironment;
+ break;
default:
console.error("Unknown type: " + payload.type);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ScopeChainNode.js (193424 => 193425)
--- trunk/Source/WebInspectorUI/UserInterface/Models/ScopeChainNode.js 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ScopeChainNode.js 2015-12-04 18:49:47 UTC (rev 193425)
@@ -58,5 +58,6 @@
With: "scope-chain-type-with",
Closure: "scope-chain-type-closure",
Catch: "scope-chain-type-catch",
- FunctionName: "scope-chain-type-functionName"
+ FunctionName: "scope-chain-type-functionName",
+ GlobalLexicalEnvironment: "scope-chain-type-globalLexicalEnvironment",
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js (193424 => 193425)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js 2015-12-04 18:45:43 UTC (rev 193424)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js 2015-12-04 18:49:47 UTC (rev 193425)
@@ -208,6 +208,11 @@
title = WebInspector.UIString("Global Variables");
collapsedByDefault = true;
break;
+
+ case WebInspector.ScopeChainNode.Type.GlobalLexicalEnvironment:
+ title = WebInspector.UIString("Global Lexical Environment");
+ collapsedByDefault = true;
+ break;
}
let detailsSectionIdentifier = scope.type + "-" + sectionCountByType.get(scope.type);