<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>70015</bug_id>
          
          <creation_ts>2011-10-13 04:06:19 -0700</creation_ts>
          <short_desc>Constructor should not be called if the object is being constructed inside WebCore</short_desc>
          <delta_ts>2011-10-18 21:52:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Kentaro Hara">haraken</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>annacc</cc>
    
    <cc>dominicc</cc>
    
    <cc>morrita</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>483107</commentid>
    <comment_count>0</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2011-10-13 04:06:19 -0700</bug_when>
    <thetext>Summary:

A DOM object can be created from the JS context and from the WebCore context. Constructor should be called if the object is created from the JS context, but should not be called if the object is created from the WebCore context. 


Details:

- Expected behavior when the object is created from the JS context (e.g. &quot;new Event()&quot;):
(1) V8XXXX::constructorCallback() is called.
(2) V8XXXX::constructorCallback() calls XXXX::create().
(3) XXXX::create() creates a C++ object.
(4) V8XXXX::constructorCallback() calls toV8() for the C++ object.
(5) toV8() wraps the C++ object and returns the wrapped JS object.

- Actual behavior when the object is created from the JS context (e.g. &quot;new Event()&quot;):
As described above (1) - (5). That&apos;s fine!!

- Expected behavior when the object is created from the WebCore context. (e.g. &quot;window.addEventListener(&quot;load&quot;, function (event) { ... });&quot;. In this case, the Event object is created inside the WebCore context):
(1) WebCore calls XXXX::create().
(2) XXXX::create() creates a C++ object.
(3) WebCore calls toV8() for the C++ object.
(4) toV8() wraps the C++ object and returns the wrapped JS object.

- Actual behavior when the object is created from the WebCore context. (e.g. &quot;window.addEventListener(&quot;load&quot;, function (event) { ... });&quot;):
(1) WebCore calls XXXX::create().
(2) XXXX::create() creates a C++ object.
(3) WebCore calls toV8() for the C++ object.
(4) toV8() can call XXXX::constructorCallback(). (Whether or not toV8() calls XXXX::constructorCallback() depends on the implementation of toV8().)
(5) V8XXXX::constructorCallback() calls XXXX::create().
(6) XXXX::create() creates __another__ C++ object.
(7) V8XXXX::constructorCallback() calls toV8() for the C++ object.
(8) toV8() wraps the C++ object and returns the wrapped JS object.

This actual behavior definitely causes the following problems:

- Problem1: The object returned to JS is not the object created in (2) but the object created in (6). However, I do not yet know a test case that causes some visible bug because of this problem. 

- Problem2: In (4), XXXX::constructorCallback() can be called with no argument. If XXXX::constructorCallback() expects at least one argument, XXXX::constructorCallback() throws TypeError, resulting in crash. For example, Event caused this problem when I implemented constructor for Event. Based on the discussion with Dominicc, we solved this problem by adding the following two lines of code to Event::constructorCallback() (See here: http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp&amp;exact_package=chromium&amp;q=allowallocation&amp;type=cs):

XXXX::constructorCallback(...) {
    ...;
    if (AllowAllocation::current())
        return args.Holder();
    ...;
}

This if check means &quot;XXXX::constructorCallback() returns immediately if it is called from the WebCore context&quot;.



With these observations, we think that all constructorCallback() should have the above if check. This patch adds the if check to CodeGeneratorV8.pm. After this patch is landed, I would like to add the if check to all existing custom V8 constructors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483113</commentid>
    <comment_count>1</comment_count>
      <attachid>110823</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2011-10-13 04:21:09 -0700</bug_when>
    <thetext>Created attachment 110823
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483327</commentid>
    <comment_count>2</comment_count>
      <attachid>110823</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-10-13 11:08:44 -0700</bug_when>
    <thetext>Comment on attachment 110823
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=110823&amp;action=review

&gt; Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1536
&gt; +    if (AllowAllocation::current())
&gt; +        return args.Holder();

Do we need this check in any of our custom constructors as well?  I don&apos;t fully understand in which cases AllowAllocation::current() return true.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483632</commentid>
    <comment_count>3</comment_count>
      <attachid>110823</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-10-13 16:38:22 -0700</bug_when>
    <thetext>Comment on attachment 110823
Patch

Clearing flags on attachment: 110823

Committed r97423: &lt;http://trac.webkit.org/changeset/97423&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483633</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-10-13 16:38:27 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483687</commentid>
    <comment_count>5</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2011-10-13 17:48:27 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 110823 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=110823&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1536
&gt; &gt; +    if (AllowAllocation::current())
&gt; &gt; +        return args.Holder();
&gt; 
&gt; Do we need this check in any of our custom constructors as well?  I don&apos;t fully understand in which cases AllowAllocation::current() return true.

Adam: AllowAllocation::current() just calls Isolate::GetCurrent(), and Isolate::GetCurrent() returns the entered isolate for the current thread or NULL in case there is no current isolate (See the comment of Isolate::GetCurrent(): http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/v8/include/v8.h&amp;type=cs&amp;l=2727). In my understanding, this means that AllowAllocation::current() returns true if it is called inside toV8() which is invoked from the WebCore context, which is the case where constructorCallback() should not be executed.

This patch added the AllowAllocation check to all non-custom constructors of V8. I think that the AllowAllocation check should be also in all custom constructors of V8. Indeed, as for existing custom constructors, no bugs have been occurring without the AllowAllocation check. However, (1) the Problem1 and Problem2 that I described above can happen in the future if someone changes code, and (2) if the AllowAllocation check does not exist in the existing custom constructors, people will add a new custom constructor without the AllowAllocation check without considering the possibility of Problem1 and Problem2, which may result in ugly bugs. 

WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483695</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-10-13 18:09:15 -0700</bug_when>
    <thetext>Checking that static information isn&apos;t correct in all cases.  For example, sometimes we run WebCore code with JavaScript on the static and sometimes we run WebCore code without JavaScript on the stack.  Have the constructors work differently in those cases isn&apos;t really correct.

I&apos;d feel a lot better about all of this if we could write tests to exercise the differences.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483822</commentid>
    <comment_count>7</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2011-10-14 00:38:29 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Checking that static information isn&apos;t correct in all cases.  For example, sometimes we run WebCore code with JavaScript on the static and sometimes we run WebCore code without JavaScript on the stack.  Have the constructors work differently in those cases isn&apos;t really correct.
&gt; 

Adam: Thank you very much. I will investigate more to find a correct way to make constructorCallback() to be called only when constructorCallback() should be called.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483823</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-10-14 00:51:35 -0700</bug_when>
    <thetext>Thanks.  I wouldn&apos;t get overly fixated on this problem, but it would be good to sort out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483916</commentid>
    <comment_count>9</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2011-10-14 05:14:02 -0700</bug_when>
    <thetext>(in reply to comment #5):

&gt; Adam: AllowAllocation::current() just calls Isolate::GetCurrent(), and Isolate::GetCurrent() returns the
&gt; entered isolate for the current thread or NULL in case there is no current isolate (See the comment of
&gt; Isolate::GetCurrent(): http://codesearch.google.com/codesearch#OAMlx_jo-
&gt; ck/src/v8/include/v8.h&amp;type=cs&amp;l=2727). In my understanding, this means that
&gt; AllowAllocation::current() returns true if it is called inside toV8() which is invoked from the WebCore
&gt; context, which is the case where constructorCallback() should not be executed.

This is not quite right. One thing that makes this confusing is that the name ”AllowAllocation” is not a good name any more. Let me try to explain:

As described in the description, V8 calls C++ constructor callbacks in two situations:

1. The author allocates an instance via &quot;new X&quot;; X is a function with a C++ construct callback.

2. C++ allocates an instance via the function template.

Typical DOM constructor functions disallow the first way—they throw.

AllowAllocation is an RAII guard. When the bindings are doing number two (ugh… that sounds bad…) it puts an AllowAllocation on the stack, the callback runs and checks the guard (this is _all_ the typical DOM constructor callback does—it is V8Proxy::checkNewLegal.)

The guard is not just &quot;is an isolate/V8 context present.&quot; It is, _are &quot;allocations allowed&quot;_ in the current isolate. A boolean that is set and restored by RAII ctor and dtor.

So you can see why AllowAllocations is no longer an appropriate name. Because method 1—the author allocates via &quot;new X&quot;—works, the allocation should be &quot;allowed.&quot; But the C++ callback needs to discern when it is invoked by the author, and should allocate the C++ object to wrap, or when it is invoked by the wrapper table which will hand it a pointer to wrap.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>484077</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-10-14 11:14:03 -0700</bug_when>
    <thetext>Ah, that makes sense.  Can we re-name AllowAllocations to make this more obvious.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>486555</commentid>
    <comment_count>11</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2011-10-18 21:52:17 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; Ah, that makes sense.  Can we re-name AllowAllocations to make this more obvious.

OK, I will fix it in the bug 70397.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>110823</attachid>
            <date>2011-10-13 04:21:09 -0700</date>
            <delta_ts>2011-10-13 16:38:22 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-70015-20111013202107.patch</filename>
            <type>text/plain</type>
            <size>7024</size>
            <attacher name="Kentaro Hara">haraken</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTczMjUKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwppbmRleCBjMDM5Y2MxZDI1OTI4YjIz
ZjBkMjE2YmEwNDU2Zjc1MDgwYWI4YWViLi5hM2NiMTdjOGFjNjkxMGMwNWVhZjdkODhkNGFkZjA5
MzhkMmZiMmU1IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvU291
cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsODEgQEAKKzIwMTEtMTAtMTMgIEtlbnRh
cm8gSGFyYSAgPGhhcmFrZW5AY2hyb21pdW0ub3JnPgorCisgICAgICAgIENvbnN0cnVjdG9yIHNo
b3VsZCBub3QgYmUgY2FsbGVkIGlmIHRoZSBvYmplY3QgaXMgYmVpbmcgY29uc3RydWN0ZWQgaW5z
aWRlIFdlYkNvcmUKKyAgICAgICAg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