Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Issue 2324093002: Don't trigger Object.prototype setters when generating completions (Closed)

Created:
4 years, 3 months ago by Sidney San Martín
Modified:
4 years, 3 months ago
Reviewers:
alph, dgozman, lushnikov
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't trigger Object.prototype setters when generating completions Autocomplete gets its candidates for completion by running a function in the context of the page. If we use a plain object to hold results, we'll end up triggering any setters that the page added to Object.prototype. Using a prototype-less object avoids this, but a page could still interfere by replacing Object.create (or Object.getPrototypeOf, String, Number, Boolean...). BUG=645328 Committed: https://crrev.com/c1431e19823dc2a0487197185795ffbe20d5a88f Cr-Commit-Position: refs/heads/master@{#417729}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Literal with __proto__ instead of Object.create() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (5 generated)
Sidney San Martín
Possible fix for crbug.com/645328.
4 years, 3 months ago (2016-09-09 03:15:23 UTC) #2
alph
Thanks for the fix! I'd like to have Lusha or dgozman to take a look. ...
4 years, 3 months ago (2016-09-09 10:14:44 UTC) #4
Sidney San Martín
https://codereview.chromium.org/2324093002/diff/1/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js File third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js (right): https://codereview.chromium.org/2324093002/diff/1/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js#newcode690 third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js:690: var resultSet = Object.create(null); On 2016/09/09 10:14:44, alph wrote: ...
4 years, 3 months ago (2016-09-09 12:09:25 UTC) #5
dgozman
https://codereview.chromium.org/2324093002/diff/1/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js File third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js (right): https://codereview.chromium.org/2324093002/diff/1/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js#newcode690 third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js:690: var resultSet = Object.create(null); I think we use { ...
4 years, 3 months ago (2016-09-09 14:56:21 UTC) #6
Sidney San Martín
https://codereview.chromium.org/2324093002/diff/1/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js File third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js (right): https://codereview.chromium.org/2324093002/diff/1/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js#newcode690 third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js:690: var resultSet = Object.create(null); On 2016/09/09 14:56:21, dgozman wrote: ...
4 years, 3 months ago (2016-09-09 15:09:28 UTC) #8
dgozman
lgtm. Thanks for the fix!
4 years, 3 months ago (2016-09-09 20:05:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2324093002/40001
4 years, 3 months ago (2016-09-09 20:43:32 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 3 months ago (2016-09-09 22:07:30 UTC) #12
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 22:10:22 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c1431e19823dc2a0487197185795ffbe20d5a88f
Cr-Commit-Position: refs/heads/master@{#417729}

Powered by Google App Engine
This is Rietveld 408576698