Diff
Modified: trunk/LayoutTests/ChangeLog (106413 => 106414)
--- trunk/LayoutTests/ChangeLog 2012-02-01 01:09:25 UTC (rev 106413)
+++ trunk/LayoutTests/ChangeLog 2012-02-01 01:18:38 UTC (rev 106414)
@@ -1,3 +1,15 @@
+2012-01-31 Oliver Hunt <[email protected]>
+
+ Remove unneeded sourceId property
+ https://bugs.webkit.org/show_bug.cgi?id=77495
+
+ Reviewed by Filip Pizlo.
+
+ Update the test for the removal of sourceId
+
+ * fast/js/exception-properties-expected.txt:
+ * fast/js/script-tests/exception-properties.js:
+
2012-01-31 Yuzo Fujishima <[email protected]>
[Chromium] Unreviewed test expectation change.
Modified: trunk/LayoutTests/fast/js/exception-properties-expected.txt (106413 => 106414)
--- trunk/LayoutTests/fast/js/exception-properties-expected.txt 2012-02-01 01:09:25 UTC (rev 106413)
+++ trunk/LayoutTests/fast/js/exception-properties-expected.txt 2012-02-01 01:18:38 UTC (rev 106414)
@@ -4,7 +4,7 @@
PASS enumerableProperties(error) is []
-PASS enumerableProperties(nativeError) is ["line", "sourceId", "sourceURL", "stack"]
+PASS enumerableProperties(nativeError) is ["line", "sourceURL", "stack"]
PASS Object.getPrototypeOf(nativeError).name is "RangeError"
PASS Object.getPrototypeOf(nativeError).message is ""
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/js/script-tests/exception-properties.js (106413 => 106414)
--- trunk/LayoutTests/fast/js/script-tests/exception-properties.js 2012-02-01 01:09:25 UTC (rev 106413)
+++ trunk/LayoutTests/fast/js/script-tests/exception-properties.js 2012-02-01 01:18:38 UTC (rev 106414)
@@ -16,7 +16,7 @@
var error = new Error("message");
shouldBe('enumerableProperties(error)', '[]');
- shouldBe('enumerableProperties(nativeError)', '["line", "sourceId", "sourceURL", "stack"]');
+ shouldBe('enumerableProperties(nativeError)', '["line", "sourceURL", "stack"]');
shouldBe('Object.getPrototypeOf(nativeError).name', '"RangeError"');
shouldBe('Object.getPrototypeOf(nativeError).message', '""');
Modified: trunk/Source/_javascript_Core/ChangeLog (106413 => 106414)
--- trunk/Source/_javascript_Core/ChangeLog 2012-02-01 01:09:25 UTC (rev 106413)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-02-01 01:18:38 UTC (rev 106414)
@@ -1,5 +1,19 @@
2012-01-31 Oliver Hunt <[email protected]>
+ Remove unneeded sourceId property
+ https://bugs.webkit.org/show_bug.cgi?id=77495
+
+ Reviewed by Filip Pizlo.
+
+ sourceId isn't used anymore, so we'll just remove it.
+
+ * runtime/Error.cpp:
+ (JSC):
+ (JSC::addErrorInfo):
+ (JSC::hasErrorInfo):
+
+2012-01-31 Oliver Hunt <[email protected]>
+
Implement Error.stack
https://bugs.webkit.org/show_bug.cgi?id=66994
Modified: trunk/Source/_javascript_Core/runtime/Error.cpp (106413 => 106414)
--- trunk/Source/_javascript_Core/runtime/Error.cpp 2012-02-01 01:09:25 UTC (rev 106413)
+++ trunk/Source/_javascript_Core/runtime/Error.cpp 2012-02-01 01:18:38 UTC (rev 106414)
@@ -39,7 +39,6 @@
namespace JSC {
static const char* linePropertyName = "line";
-static const char* sourceIdPropertyName = "sourceId";
static const char* sourceURLPropertyName = "sourceURL";
JSObject* createError(JSGlobalObject* globalObject, const UString& message)
@@ -121,13 +120,10 @@
JSObject* addErrorInfo(JSGlobalData* globalData, JSObject* error, int line, const SourceCode& source, const Vector<StackFrame>& stackTrace)
{
- intptr_t sourceID = source.provider()->asID();
const UString& sourceURL = source.provider()->url();
if (line != -1)
error->putDirect(*globalData, Identifier(globalData, linePropertyName), jsNumber(line), ReadOnly | DontDelete);
- if (sourceID != -1)
- error->putDirect(*globalData, Identifier(globalData, sourceIdPropertyName), jsNumber((double)sourceID), ReadOnly | DontDelete);
if (!sourceURL.isNull())
error->putDirect(*globalData, Identifier(globalData, sourceURLPropertyName), jsString(globalData, sourceURL), ReadOnly | DontDelete);
if (!stackTrace.isEmpty()) {
@@ -163,7 +159,6 @@
bool hasErrorInfo(ExecState* exec, JSObject* error)
{
return error->hasProperty(exec, Identifier(exec, linePropertyName))
- || error->hasProperty(exec, Identifier(exec, sourceIdPropertyName))
|| error->hasProperty(exec, Identifier(exec, sourceURLPropertyName));
}