WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
50063
[v8] Web Inspector: display name of an object constructor as the object's type
https://bugs.webkit.org/show_bug.cgi?id=50063
Summary
[v8] Web Inspector: display name of an object constructor as the object's type
Yury Semikhatsky
Reported
2010-11-25 03:33:48 PST
Chrome's web inspector shows somewhat misleading "representation" of an object. Run this in web inspector's console: function Parent(){} function Child(){} Child.prototype = new Parent; new Child; // displayed as "Parent", instead of expected "Child" It looks like object representation is the result of evaluating non-standard "name" property of object's constructor (or something similar to that). Once `Child.prototype.constructor` is set to reference `Child`, object is represented as "Child". Would it be possible to change this behavior, so that `new Child` is represented as "Child" without setting `Child.prototype.constructor` to `Child`? (the latter is not always possible when working with 3rd party code) Original Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=63383
Attachments
Patch
(11.55 KB, patch)
2010-11-25 06:41 PST
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Patch
(11.55 KB, patch)
2010-11-25 06:50 PST
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Patch
(11.60 KB, patch)
2010-11-25 08:01 PST
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yury Semikhatsky
Comment 1
2010-11-25 06:41:27 PST
Created
attachment 74869
[details]
Patch
anton muhin
Comment 2
2010-11-25 06:43:48 PST
Comment on
attachment 74869
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=74869&action=review
> WebCore/inspector/front-end/InjectedScript.js:432 > + // In Chromium DOM wrapper prototypes will have Object as their construcor name,
nit: construc[t]or
Yury Semikhatsky
Comment 3
2010-11-25 06:50:55 PST
Created
attachment 74871
[details]
Patch
Yury Semikhatsky
Comment 4
2010-11-25 07:02:43 PST
(In reply to
comment #2
)
> (From update of
attachment 74869
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=74869&action=review
> > > WebCore/inspector/front-end/InjectedScript.js:432 > > + // In Chromium DOM wrapper prototypes will have Object as their construcor name, > > nit: construc[t]or
Fixed.
Pavel Feldman
Comment 5
2010-11-25 07:08:54 PST
Comment on
attachment 74871
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=74871&action=review
Please do renaming prior to landing.
> WebCore/inspector/InjectedScriptHost.idl:41 > + [Custom] DOMObject constructorName(in DOMObject object);
internalConstructorName?
> WebCore/inspector/front-end/InjectedScript.js:431 > + if (result === "Object") {
If constructorName is Object, then we use constructor name?
Eric Seidel (no email)
Comment 6
2010-11-25 07:26:29 PST
Attachment 74871
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/6391041
Yury Semikhatsky
Comment 7
2010-11-25 08:01:07 PST
Created
attachment 74879
[details]
Patch
Yury Semikhatsky
Comment 8
2010-11-25 08:02:16 PST
(In reply to
comment #5
)
> (From update of
attachment 74871
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=74871&action=review
> > Please do renaming prior to landing. > > > WebCore/inspector/InjectedScriptHost.idl:41 > > + [Custom] DOMObject constructorName(in DOMObject object); > > internalConstructorName? >
Done.
Eric Seidel (no email)
Comment 9
2010-11-25 09:05:16 PST
Attachment 74879
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/6314046
WebKit Review Bot
Comment 10
2010-11-28 14:18:34 PST
Attachment 74879
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/6410092
Yury Semikhatsky
Comment 11
2010-11-29 08:05:54 PST
Committed
r72800
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug