Title: [184697] trunk/Source/_javascript_Core
Revision
184697
Author
[email protected]
Date
2015-05-20 22:12:04 -0700 (Wed, 20 May 2015)

Log Message

Web Inspector: Use native Arguments detection instead of using toString
https://bugs.webkit.org/show_bug.cgi?id=145235

Patch by Joseph Pecoraro <[email protected]> on 2015-05-20
Reviewed by Timothy Hatcher.

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype._subtype):
Deleted the old string code.

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
Replaced with a stricter, more accurate check.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (184696 => 184697)


--- trunk/Source/_javascript_Core/ChangeLog	2015-05-21 04:48:07 UTC (rev 184696)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-05-21 05:12:04 UTC (rev 184697)
@@ -1,3 +1,18 @@
+2015-05-20  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Use native Arguments detection instead of using toString
+        https://bugs.webkit.org/show_bug.cgi?id=145235
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/InjectedScriptSource.js:
+        (InjectedScript.prototype._subtype):
+        Deleted the old string code.
+
+        * inspector/JSInjectedScriptHost.cpp:
+        (Inspector::JSInjectedScriptHost::subtype):
+        Replaced with a stricter, more accurate check.
+
 2015-05-20  Andreas Kling  <[email protected]>
 
         Remove unused MarkedBlock::m_rememberedSet.

Modified: trunk/Source/_javascript_Core/inspector/InjectedScriptSource.js (184696 => 184697)


--- trunk/Source/_javascript_Core/inspector/InjectedScriptSource.js	2015-05-21 04:48:07 UTC (rev 184696)
+++ trunk/Source/_javascript_Core/inspector/InjectedScriptSource.js	2015-05-21 05:12:04 UTC (rev 184697)
@@ -747,8 +747,6 @@
         try {
             if (typeof obj.splice === "function" && isFinite(obj.length))
                 return "array";
-            if (Object.prototype.toString.call(obj) === "[object Arguments]" && isFinite(obj.length)) // arguments.
-                return "array";
         } catch (e) {
         }
 

Modified: trunk/Source/_javascript_Core/inspector/JSInjectedScriptHost.cpp (184696 => 184697)


--- trunk/Source/_javascript_Core/inspector/JSInjectedScriptHost.cpp	2015-05-21 04:48:07 UTC (rev 184696)
+++ trunk/Source/_javascript_Core/inspector/JSInjectedScriptHost.cpp	2015-05-21 05:12:04 UTC (rev 184697)
@@ -27,6 +27,7 @@
 #include "JSInjectedScriptHost.h"
 
 #include "DateInstance.h"
+#include "DirectArguments.h"
 #include "Error.h"
 #include "InjectedScriptHost.h"
 #include "IteratorOperations.h"
@@ -46,6 +47,7 @@
 #include "JSWeakSet.h"
 #include "ObjectConstructor.h"
 #include "RegExpObject.h"
+#include "ScopedArguments.h"
 #include "SourceCode.h"
 #include "TypedArrayInlines.h"
 #include "WeakMapData.h"
@@ -146,6 +148,9 @@
 
     if (value.inherits(JSArray::info()))
         return jsNontrivialString(exec, ASCIILiteral("array"));
+    if (value.inherits(DirectArguments::info()) || value.inherits(ScopedArguments::info()))
+        return jsNontrivialString(exec, ASCIILiteral("array"));
+
     if (value.inherits(DateInstance::info()))
         return jsNontrivialString(exec, ASCIILiteral("date"));
     if (value.inherits(RegExpObject::info()))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to