Changeset 133727 in webkit


Ignore:
Timestamp:
Nov 7, 2012 12:32:34 AM (11 years ago)
Author:
yurys@chromium.org
Message:

Console not displaying all properties of an Object once native Constructor overwritten
https://bugs.webkit.org/show_bug.cgi?id=101320

Reviewed by Pavel Feldman.

Source/WebCore:

Use Object instance from {}.constructor when formatting inspector messages in the
injected script. Otherwise inspected page may overwrite Object value and break inspector.

Test: inspector/console/console-Object-overwritten.html

  • inspector/InjectedScriptSource.js:

LayoutTests:

Check that Web Inspector's console works fine if Object is overwritten in the inspected
page.

  • inspector/console/console-Object-overwritten-expected.txt: Added.
  • inspector/console/console-Object-overwritten.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r133725 r133727  
     12012-11-06  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Console not displaying all properties of an Object once native Constructor overwritten
     4        https://bugs.webkit.org/show_bug.cgi?id=101320
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Check that Web Inspector's console works fine if Object is overwritten in the inspected
     9        page.
     10
     11        * inspector/console/console-Object-overwritten-expected.txt: Added.
     12        * inspector/console/console-Object-overwritten.html: Added.
     13
    1142012-11-06  Kangil Han  <kangil.han@samsung.com>
    215
  • trunk/LayoutTests/inspector/console/command-line-api-expected.txt

    r133150 r133727  
    1 CONSOLE MESSAGE: line 1028: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s")
     1CONSOLE MESSAGE: line 1031: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s")
    22Tests that command line api works.
    33
  • trunk/Source/WebCore/ChangeLog

    r133722 r133727  
     12012-11-06  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Console not displaying all properties of an Object once native Constructor overwritten
     4        https://bugs.webkit.org/show_bug.cgi?id=101320
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Use Object instance from {}.constructor when formatting inspector messages in the
     9        injected script. Otherwise inspected page may overwrite Object value and break inspector.
     10
     11        Test: inspector/console/console-Object-overwritten.html
     12
     13        * inspector/InjectedScriptSource.js:
     14
    1152012-11-06  Keishi Hattori  <keishi@webkit.org>
    216
  • trunk/Source/WebCore/inspector/InjectedScriptSource.js

    r133463 r133727  
    3434(function (InjectedScriptHost, inspectedWindow, injectedScriptId) {
    3535
     36// Protect against Object overwritten by the user code.
     37var Object = {}.constructor;
     38
    3639/**
    3740 * @param {Arguments} array
Note: See TracChangeset for help on using the changeset viewer.