RESOLVED FIXED 70397
Rename AllowAllocation to a better name
https://bugs.webkit.org/show_bug.cgi?id=70397
Summary Rename AllowAllocation to a better name
Kentaro Hara
Reported 2011-10-18 21:43:53 PDT
The name 'AllowAllocation' is confusing (See discussion here: bug 70015). We should rename it to clarify that this class is for distinguishing the following two situations: 1. A programmer allocates an object via "new X"; X is a function with a C++ constructCallback. 2. C++ allocates an object via the function template and tries to wrap the object with the JS flavor.
Attachments
Patch (7.90 KB, patch)
2011-10-18 22:04 PDT, Kentaro Hara
abarth: review+
patch for commit (7.93 KB, patch)
2011-10-19 00:15 PDT, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2011-10-18 22:04:34 PDT
Adam Barth
Comment 2 2011-10-18 23:59:35 PDT
Comment on attachment 111563 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=111563&action=review > Source/WebCore/bindings/v8/V8Binding.h:211 > - AllowAllocation allow; > + ConstructorMode allow; Maybe rename "allow" to something else?
Kentaro Hara
Comment 3 2011-10-19 00:15:01 PDT
Created attachment 111568 [details] patch for commit
Kentaro Hara
Comment 4 2011-10-19 00:23:34 PDT
(In reply to comment #2) > (From update of attachment 111563 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=111563&action=review > > > Source/WebCore/bindings/v8/V8Binding.h:211 > > - AllowAllocation allow; > > + ConstructorMode allow; > > Maybe rename "allow" to something else? Renamed to "constructorMode", and committed. Thanks. By the way, I am planning to add the ConstructorMode check to all existing custom ~25 constructors, but does that make sense?
WebKit Review Bot
Comment 5 2011-10-19 00:46:28 PDT
Comment on attachment 111568 [details] patch for commit Clearing flags on attachment: 111568 Committed r97839: <http://trac.webkit.org/changeset/97839>
Adam Barth
Comment 6 2011-10-19 13:25:49 PDT
> By the way, I am planning to add the ConstructorMode check to all existing custom ~25 constructors, but does that make sense? Yep.
Note You need to log in before you can comment on or make changes to this bug.