Summary: | Web Inspector: intern strings when processing timeline records | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrey Kosyakov <caseq> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Andrey Kosyakov <caseq> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Andrey Kosyakov
2012-07-17 12:01:46 PDT
Created attachment 152803 [details]
Patch
Comment on attachment 152803 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152803&action=review > Source/WebCore/inspector/front-end/utilities.js:729 > + deepIntern: function(obj) internObject? > Source/WebCore/inspector/front-end/utilities.js:737 > + this.deepIntern(obj[field]); Do you want to introduce a re-entrance guard here to say support up to 100 levels? Stack overflow is sometimes hard to debug. Comment on attachment 152803 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152803&action=review > Source/WebCore/inspector/front-end/utilities.js:711 > + intern: function(string) what if string is equal to "__proto__" or "constructor" or "toString" or etc. ? maybe add (this._strings.__proto__ = null) to the constructor and reset() methods? >> Source/WebCore/inspector/front-end/utilities.js:729 >> + deepIntern: function(obj) > > internObject? a test case: var obj = {}; obj.foo = obj; pool.deepIntern(obj); Created attachment 153002 [details]
Patch
Comment on attachment 153002 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153002&action=review > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:635 > + if (!this._details) Is this a part of a different change? > Source/WebCore/inspector/front-end/utilities.js:729 > + if (string === "__proto__") What does this mean? > Source/WebCore/inspector/front-end/utilities.js:741 > + this._strings = { __proto__: null }; Object.create(null) Committed r122964: <http://trac.webkit.org/changeset/122964> |