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.
Created attachment 111563 [details] Patch
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?
Created attachment 111568 [details] patch for commit
(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?
Comment on attachment 111568 [details] patch for commit Clearing flags on attachment: 111568 Committed r97839: <http://trac.webkit.org/changeset/97839>
> By the way, I am planning to add the ConstructorMode check to all existing custom ~25 constructors, but does that make sense? Yep.