Bug 48739
Summary: | Web Inspector: [JSC] use constructor.name as a display name for objects that are non-DOM bindings.. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Pavel Feldman <pfeldman> |
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, kpiascik, loislo, pfeldman, pmuellr, rik, yurys |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Pavel Feldman
Evaluating
function FooBar() {}; var fooBar = new FooBar(); fooBar;
in console gives
> Object
should give
> FooBar
Problem is that InjectedScript._className is wrong. It uses Object.prototype.toString unconditionally for JSC, whereas it could use constructor.name for non-DOM binding objects.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Konrad Piascik
In safari typing:
function FooBar() {}; var fooBar = new FooBar(); fooBar;
in the console I get FooBar instead of Object.