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

Issue 1100053002: Revert of IDL: Add support for [Unscopeable] on attributes and methods (Closed)

Created:
5 years, 8 months ago by alancutter (OOO until 2018)
Modified:
5 years, 8 months ago
Reviewers:
haraken, Jens Widell, bashi
CC:
blink-reviews, blink-reviews-bindings_chromium.org, vivekg_samsung, arv+blink, Inactive, vivekg
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Revert of IDL: Add support for [Unscopeable] on attributes and methods (patchset #2 id:20001 of https://codereview.chromium.org/1085453003/) Reason for revert: This change caused 5k+ leaks on WebKit Linux Leak. Confirmed via bisect. http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/builds/10565 Original issue's description: > IDL: Add support for [Unscopeable] on attributes and methods > > Adding [Unscopeable] to an attribute or method means it won't be found > during name lookup with an object that has the attribute or method in > the scope (i.e. using the "with" statement.) > > The mechanism that makes this happen is that the interface prototype > object has a property named @@unscopables that is an object with a > property for every unscopeable member named as the member. > > BUG=462916 > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194091 TBR=haraken@chromium.org,bashi@chromium.org,jl@opera.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=462916 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194191

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -129 lines) Patch
D LayoutTests/fast/js/unscopeable.html View 1 chunk +0 lines, -26 lines 0 comments Download
D LayoutTests/fast/js/unscopeable-expected.txt View 1 chunk +0 lines, -15 lines 0 comments Download
M Source/bindings/IDLExtendedAttributes.txt View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/scripts/v8_interface.py View 2 chunks +0 lines, -10 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 1 chunk +0 lines, -8 lines 0 comments Download
M Source/bindings/tests/idls/core/TestObject.idl View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 5 chunks +0 lines, -52 lines 0 comments Download
M Source/core/testing/Internals.h View 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 chunk +0 lines, -9 lines 0 comments Download
M Source/core/testing/Internals.idl View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
alancutter (OOO until 2018)
Created Revert of IDL: Add support for [Unscopeable] on attributes and methods
5 years, 8 months ago (2015-04-22 04:05:45 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1100053002/1
5 years, 8 months ago (2015-04-22 04:05:59 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=194191
5 years, 8 months ago (2015-04-22 04:06:37 UTC) #3
haraken
LGTM, thanks for the revert. (I'm happy to see that the leak detector is working, ...
5 years, 8 months ago (2015-04-22 05:17:25 UTC) #4
Jens Widell
Thanks for reverting! haraken@: do you have any guess how the patch caused a leak?
5 years, 8 months ago (2015-04-22 06:13:54 UTC) #5
haraken
On 2015/04/22 06:13:54, Jens Widell wrote: > Thanks for reverting! > > haraken@: do you ...
5 years, 8 months ago (2015-04-22 06:25:11 UTC) #6
Jens Widell
On 2015/04/22 06:25:11, haraken wrote: > On 2015/04/22 06:13:54, Jens Widell wrote: > > Thanks ...
5 years, 8 months ago (2015-04-22 06:28:18 UTC) #7
haraken
5 years, 8 months ago (2015-04-22 06:31:37 UTC) #8
Message was sent while issue was closed.
On 2015/04/22 06:28:18, Jens Widell wrote:
> On 2015/04/22 06:25:11, haraken wrote:
> > On 2015/04/22 06:13:54, Jens Widell wrote:
> > > Thanks for reverting!
> > > 
> > > haraken@: do you have any guess how the patch caused a leak?
> > 
> > Not sure but:
> > 
> > > v8::Local<v8::Object> unscopeables(v8::Object::New(isolate));
> > 
> > ^^^ unscopeables creates a strong reference to the context that created the
> > unscopeables (i.e., unscopeables->CreationContext()).
> > 
> > Thus it will create a reference chain like:
> > 
> >   prototypeTemplate => unscopeables => context => everything in the context
> > 
> > Given that prototypeTemplate is kept alive as long as the isolate is alive,
it
> > will leak the objects in the context. In other words, we shouldn't add a
> strong
> > reference from prototypeTemplate to some object.
> 
> Should we create the unscopables object when creating the prototype object
> instead of when setting up the prototype template, then?

Sounds reasonable to me. It seems safe to create a reference from the prototype
object to the unscopeable object.

Powered by Google App Engine
This is Rietveld 408576698