Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(59)

Issue 12503044: SES test and repair "FREEZING_BREAKS_WEAKMAP". (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 2 months ago by kpreid_google
Modified:
13 years, 2 months ago
Reviewers:
Kris Kowal, felix8a, MarkM
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

V8 bug <https://code.google.com/p/v8/issues/detail?id=2829>: If Object.prototype is in a WeakMap while Object.prototype is frozen then WeakMap stops working properly (for objects inheriting from that prototype). Add a test and repair which discards the broken WeakMap in favor of our emulation. (It is possible that there is a tweak to startSES's order of execution which would leave the native WeakMap functional, but I don't want to try to verify the correctness of such, at least unless we get some info on the underlying cause from the V8 developers.) Supporting changes (made to help find the above bug, but worthwhile themselves even if not necessary for fixing it): * hookupSES prints the error message as well as the object (which Chrome's console unfortunately doesn't do automatically). * Guest content loaded as text/javascript did not receive JS globals in ES5 mode; fixed and tested. * Domado is now constructed lazily when the first guest with DOM access is created (thus not at all if only JS is loaded). * generic-host-page has an option to omit providing a div. Fixes <https://code.google.com/p/google-caja/issues/detail?id=1831>. @r5535

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -9 lines) Patch
M src/com/google/caja/plugin/guest-manager.js View 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/plugin/ses-frame-group.js View 3 chunks +7 lines, -3 lines 0 comments Download
M src/com/google/caja/ses/hookupSES.js View 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/ses/repairES5.js View 3 chunks +53 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/es53-test-guest.js View 1 chunk +2 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/generic-host-page.html View 4 chunks +21 lines, -3 lines 0 comments Download

Messages

Total messages: 5
kpreid_google
13 years, 2 months ago (2013-08-06 21:40:24 UTC) #1
Kris Kowal
It would be helpful downstream in Node.js/NPM if this check were subsumed in WeakMap.js. It ...
13 years, 2 months ago (2013-08-07 00:11:21 UTC) #2
MarkM
Hi Kris, please have a look at the inTestFrame function defined on line 871 of ...
13 years, 2 months ago (2013-08-07 00:27:49 UTC) #3
MarkM
ses/* parts LGTM. Extending inTestFrame to work on NodeJS should be a separate CL that ...
13 years, 2 months ago (2013-08-07 00:30:01 UTC) #4
felix8a
13 years, 2 months ago (2013-08-07 17:55:09 UTC) #5
lgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b