Changeset 112102 in webkit


Ignore:
Timestamp:
Mar 26, 2012 8:30:20 AM (12 years ago)
Author:
pfeldman@chromium.org
Message:

Web Inspector: 'use strict' exceptions stop in inspector code
https://bugs.webkit.org/show_bug.cgi?id=82199

Reviewed by Yury Semikhatsky.

Source/WebCore:

Accessing callee from within InjectedScript made inspector stop on handled exceptions.
I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".

  • inspector/InjectedScriptSource.js:

LayoutTests:

  • inspector/console/console-format-collections-expected.txt:
  • inspector/console/console-format-collections.html:
  • platform/chromium/inspector/console/console-format-collections-expected.txt:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r112099 r112102  
     12012-03-26  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Web Inspector: 'use strict' exceptions stop in inspector code
     4        https://bugs.webkit.org/show_bug.cgi?id=82199
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * inspector/console/console-format-collections-expected.txt:
     9        * inspector/console/console-format-collections.html:
     10        * platform/chromium/inspector/console/console-format-collections-expected.txt:
     11
    1122012-03-26  Mihai Balan  <mibalan@adobe.com>
    213
  • trunk/LayoutTests/inspector/console/console-format-collections-expected.txt

    r111385 r112102  
    77CONSOLE MESSAGE: line 41: 1,2,
    88CONSOLE MESSAGE: line 44: [object Object]
     9CONSOLE MESSAGE: line 51: [object Arguments]
    910Tests that console nicely formats HTML Collections and NodeLists.
    1011
     
    1920[1, Array[2]] console-format-collections.html:41
    2021NonArrayWithLength console-format-collections.html:44
     22[1, "2"] console-format-collections.html:51
    2123
  • trunk/LayoutTests/inspector/console/console-format-collections.html

    r111385 r112102  
    4444    console.log(nonArray);
    4545
     46    // Arguments
     47    function generateArguments(foo, bar)
     48    {
     49        return arguments;
     50    }
     51    console.log(generateArguments(1, "2"));
    4652    runTest();
    4753}
  • trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt

    r111385 r112102  
    77CONSOLE MESSAGE: line 41: 1,2,
    88CONSOLE MESSAGE: line 44: [object Object]
     9CONSOLE MESSAGE: line 51: [object Arguments]
    910Tests that console nicely formats HTML Collections and NodeLists.
    1011
     
    1920[1, Array[2]] console-format-collections.html:41
    2021NonArrayWithLength console-format-collections.html:44
     22[1, "2"] console-format-collections.html:51
    2123
  • trunk/Source/WebCore/ChangeLog

    r112099 r112102  
     12012-03-26  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Web Inspector: 'use strict' exceptions stop in inspector code
     4        https://bugs.webkit.org/show_bug.cgi?id=82199
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        Accessing callee from within InjectedScript made inspector stop on handled exceptions.
     9        I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".
     10
     11        * inspector/InjectedScriptSource.js:
     12
    1132012-03-26  Mihai Balan  <mibalan@adobe.com>
    214
  • trunk/Source/WebCore/inspector/InjectedScriptSource.js

    r111529 r112102  
    425425            if (typeof obj.splice === "function" && isFinite(obj.length))
    426426                return "array";
    427             if (typeof obj.callee === "function" && isFinite(obj.length)) // arguments.
     427            if (Object.prototype.toString.call(obj) === "[object Arguments]" && isFinite(obj.length)) // arguments.
    428428                return "array";
    429429        } catch (e) {
Note: See TracChangeset for help on using the changeset viewer.