Bug 102158 - [V8] Merge getCachedWrapper(Node*) into DOMDataStore
Summary: [V8] Merge getCachedWrapper(Node*) into DOMDataStore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on: 102156 102777
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-13 17:36 PST by Adam Barth
Modified: 2012-11-20 18:31 PST (History)
6 users (show)

See Also:


Attachments
Patch (8.47 KB, patch)
2012-11-13 17:37 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (9.87 KB, patch)
2012-11-19 17:15 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (9.15 KB, patch)
2012-11-19 17:16 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (12.22 KB, patch)
2012-11-19 17:18 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (1.54 KB, patch)
2012-11-19 22:16 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (1.84 KB, patch)
2012-11-20 00:29 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
patch for landing (1.85 KB, patch)
2012-11-20 16:52 PST, Kentaro Hara
abarth: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2012-11-13 17:36:01 PST
[V8] Merge getCachedWrapper(Node*) into DOMDataStore
Comment 1 Adam Barth 2012-11-13 17:37:09 PST
Created attachment 174035 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-11-13 17:39:09 PST
Comment on attachment 174035 [details]
Patch

Seems reasonable.  Normal caveat applies (talk to harken if you feel you need).
Comment 3 Eric Seidel (no email) 2012-11-13 17:39:54 PST
I mean haraken. :)
Comment 4 Kentaro Hara 2012-11-13 18:33:27 PST
Comment on attachment 174035 [details]
Patch

LGTM too
Comment 5 Adam Barth 2012-11-19 17:15:37 PST
Created attachment 175085 [details]
Patch for landing
Comment 6 Adam Barth 2012-11-19 17:16:42 PST
Created attachment 175086 [details]
Patch for landing
Comment 7 Adam Barth 2012-11-19 17:18:07 PST
Created attachment 175087 [details]
Patch for landing
Comment 8 WebKit Review Bot 2012-11-19 17:42:39 PST
Comment on attachment 175087 [details]
Patch for landing

Rejecting attachment 175087 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
kendImpl.h:32,
                 from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp:27:
Source/WebCore/Modules/indexeddb/IDBBackingStore.h:76: error: ISO C++ forbids declaration of 'DISALLOW_COPY_AND_ASSIGN' with no type
  CXX(target) out/Release/obj.target/webcore_remaining/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.o
make: *** [out/Release/obj.target/webcore_remaining/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.o] Error 1
make: *** Waiting for unfinished jobs....

Full output: http://queues.webkit.org/results/14894386
Comment 9 Adam Barth 2012-11-19 17:44:50 PST
I don't understand how this compiles without my patch...  DISALLOW_COPY_AND_ASSIGN isn't a WebKit macro...
Comment 10 WebKit Review Bot 2012-11-19 18:40:11 PST
Comment on attachment 175087 [details]
Patch for landing

Clearing flags on attachment: 175087

Committed r135230: <http://trac.webkit.org/changeset/135230>
Comment 11 WebKit Review Bot 2012-11-19 18:40:15 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Yury Semikhatsky 2012-11-19 21:08:01 PST
(In reply to comment #10)
> (From update of attachment 175087 [details])
> Clearing flags on attachment: 175087
> 
> Committed r135230: <http://trac.webkit.org/changeset/135230>

This commit caused compilation failure on Chromium Debug builders: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20%28dbg%29/builds/1943/steps/compile/logs/stdio

I removed the ASSERT for now in http://trac.webkit.org/changeset/135244.
Comment 13 Kentaro Hara 2012-11-19 22:16:52 PST
Reopening to attach new patch.
Comment 14 Kentaro Hara 2012-11-19 22:16:54 PST
Created attachment 175140 [details]
Patch
Comment 15 Kentaro Hara 2012-11-19 22:18:06 PST
Comment on attachment 175140 [details]
Patch

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

> Source/WebCore/bindings/v8/DOMDataStore.h:66
> +        if (LIKELY(!DOMWrapperWorld::isolatedWorldsExist())) {

Just a confirmation: !v8::Context::InContext() is not needed here, right?
Comment 16 Adam Barth 2012-11-19 23:33:07 PST
Comment on attachment 175140 [details]
Patch

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

>> Source/WebCore/bindings/v8/DOMDataStore.h:66
>> +        if (LIKELY(!DOMWrapperWorld::isolatedWorldsExist())) {
> 
> Just a confirmation: !v8::Context::InContext() is not needed here, right?

Correct.
Comment 17 Adam Barth 2012-11-19 23:34:10 PST
> This commit caused compilation failure on Chromium Debug builders: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20%28dbg%29/builds/1943/steps/compile/logs/stdio
> 
> I removed the ASSERT for now in http://trac.webkit.org/changeset/135244.

Thanks.  Yes, now that this function is static, we can't assert something about the object's member variables.
Comment 18 WebKit Review Bot 2012-11-19 23:40:36 PST
Comment on attachment 175140 [details]
Patch

Clearing flags on attachment: 175140

Committed r135257: <http://trac.webkit.org/changeset/135257>
Comment 19 WebKit Review Bot 2012-11-19 23:40:41 PST
All reviewed patches have been landed.  Closing bug.
Comment 20 Yury Semikhatsky 2012-11-20 00:02:41 PST
This (In reply to comment #18)
> (From update of attachment 175140 [details])
> Clearing flags on attachment: 175140
> 
> Committed r135257: <http://trac.webkit.org/changeset/135257>

This change broke Debug compilation for the same reason as the original patch:

In file included from ../../WebCore/bindings/v8/V8DOMWrapper.h:34:
../../WebCore/bindings/v8/DOMDataStore.h:67:20: error: call to non-static member function without an object argument
            ASSERT(wrapperIsStoredInObject(object));
                   ^~~~~~~~~~~~~~~~~~~~~~~
../../WTF/wtf/Assertions.h:247:8: note: expanded from macro 'ASSERT'
    (!(assertion) ? \
       ^

http://chromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Mac%20Builder%20%28dbg%29/builds/34123/steps/compile/logs/stdio

Please make sure your changes at least compile before committing them.
Comment 21 Kentaro Hara 2012-11-20 00:04:22 PST
(In reply to comment #20)
> This change broke Debug compilation for the same reason as the original patch:

I'm sorry, I'll fix asap after confirming the debug build locally.
Comment 22 Kentaro Hara 2012-11-20 00:29:50 PST
Created attachment 175168 [details]
Patch
Comment 23 Kentaro Hara 2012-11-20 00:30:48 PST
Comment on attachment 175168 [details]
Patch

I confirmed it works in my local Chromiu/Debug build.
Comment 24 Adam Barth 2012-11-20 00:31:32 PST
Comment on attachment 175168 [details]
Patch

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

> Source/WebCore/bindings/v8/DOMDataStore.h:67
> -            ASSERT(wrapperIsStoredInObject(object));
> +            ASSERT(current(isolate)->wrapperIsStoredInObject(object));

This isn't right.  Let's just remove the assertion.
Comment 25 Kentaro Hara 2012-11-20 00:36:05 PST
(In reply to comment #24)
> > Source/WebCore/bindings/v8/DOMDataStore.h:67
> > -            ASSERT(wrapperIsStoredInObject(object));
> > +            ASSERT(current(isolate)->wrapperIsStoredInObject(object));
> 
> This isn't right.  Let's just remove the assertion.

It's OK to remove the assertion, but why isn't it right?
Comment 26 Adam Barth 2012-11-20 01:27:11 PST
(In reply to comment #25)
> (In reply to comment #24)
> > > Source/WebCore/bindings/v8/DOMDataStore.h:67
> > > -            ASSERT(wrapperIsStoredInObject(object));
> > > +            ASSERT(current(isolate)->wrapperIsStoredInObject(object));
> > 
> > This isn't right.  Let's just remove the assertion.
> 
> It's OK to remove the assertion, but why isn't it right?

You're right, this assertion is correct.  Node implies that we must be on the main thread, and the non-existence of isolated worlds implies that this must be the main world.
Comment 27 Kentaro Hara 2012-11-20 16:42:20 PST
Comment on attachment 175168 [details]
Patch

I need to rebase with ToT.
Comment 28 Kentaro Hara 2012-11-20 16:52:01 PST
Created attachment 175303 [details]
patch for landing
Comment 29 Adam Barth 2012-11-20 16:55:48 PST
Comment on attachment 175303 [details]
patch for landing

One moment.  This patch is based on something we might need to roll out because of  bug 102852
Comment 30 Kentaro Hara 2012-11-20 16:57:08 PST
ok, feel free to insert this assertion when you reland your patch.
Comment 31 Adam Barth 2012-11-20 17:54:09 PST
Comment on attachment 175303 [details]
patch for landing

One moment.
Comment 32 Adam Barth 2012-11-20 18:31:16 PST
If you don't mind, we can skip this patch because I'm changing how this stuff works a bit in bug 102854.