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

Issue 209713003: Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed)

Created:
6 years, 9 months ago by haraken
Modified:
6 years, 9 months ago
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, gavinp+loader_chromium.org, sof, kouhei+bindings_chromium.org, abarth-chromium, falken, marja+watch_chromium.org, dglazkov+blink, dominicc+watchlist_chromium.org, adamk+blink_chromium.org, horo+watch_chromium.org, kinuko+watch, Nate Chapin, Inactive
Visibility:
Public.

Description

Make DOMWrapperWorld::current() return a reference instead of a pointer Now that it's guaranteed that DOMWrapperWorld is not 0 at any given time, we can make it a reference instead of a pointer. BUG=341032 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170261

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -145 lines) Patch
M Source/bindings/templates/callback_interface.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/interface.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/interface.cpp View 1 5 chunks +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/V8SVGTestInterface.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestCallbackInterface.cpp View 1 10 chunks +10 lines, -10 lines 0 comments Download
M Source/bindings/tests/results/V8TestEventTarget.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestException.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDoNotCheckConstants.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceDocument.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEmpty.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython2.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython3.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestNode.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObject.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsAnonymous.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsCustom.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsIdentifierRaisesException.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsInt.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperationsOverrideBuiltins.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/CustomElementConstructorBuilder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/CustomElementWrapper.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/DOMDataStore.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/DOMDataStore.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/DOMRequestState.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/DOMWrapperWorld.h View 1 chunk +4 lines, -5 lines 0 comments Download
M Source/bindings/v8/DOMWrapperWorld.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/v8/MIDIAccessResolver.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/ScriptController.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/ScriptController.cpp View 1 4 chunks +11 lines, -15 lines 0 comments Download
M Source/bindings/v8/ScriptPreprocessor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/SerializedScriptValue.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8AbstractEventListener.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8AbstractEventListener.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8Binding.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/V8DOMConfiguration.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8DOMConfiguration.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8ErrorHandler.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8Initializer.cpp View 1 3 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/V8MutationCallback.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8PerContextData.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8PerContextData.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/V8PerIsolateData.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8WindowShell.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8WindowShell.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/WorkerScriptController.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/WorkerScriptController.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/custom/V8ArrayBufferCustom.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8CustomEventCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8MessageEventCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8TypedArrayCustom.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/events/EventListener.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/loader/EmptyClients.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/FrameLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/FrameLoader.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/loader/FrameLoaderClient.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/web/FrameLoaderClientImpl.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/web/FrameLoaderClientImpl.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/web/tests/CustomEventTest.cpp View 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
dcarney
lgtm
6 years, 9 months ago (2014-03-24 07:24:24 UTC) #1
haraken
On 2014/03/24 07:24:24, dcarney wrote: > lgtm Thanks, I'll take care of a couple of ...
6 years, 9 months ago (2014-03-24 07:25:16 UTC) #2
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-26 07:38:31 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/209713003/20001
6 years, 9 months ago (2014-03-26 07:38:33 UTC) #4
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 07:48:56 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on blink_presubmit
6 years, 9 months ago (2014-03-26 07:48:57 UTC) #6
haraken
jochen@: would you take a look at web/ ?
6 years, 9 months ago (2014-03-26 09:25:37 UTC) #7
haraken
jochen: ping?
6 years, 9 months ago (2014-03-27 01:34:50 UTC) #8
haraken
abarth: would you rubberstamp web/ ?
6 years, 9 months ago (2014-03-28 01:34:37 UTC) #9
abarth-chromium
Source/web LGTM
6 years, 9 months ago (2014-03-28 03:58:33 UTC) #10
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-28 03:58:51 UTC) #11
haraken
On 2014/03/28 03:58:33, abarth wrote: > Source/web LGTM Thanks!
6 years, 9 months ago (2014-03-28 03:58:55 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/209713003/20001
6 years, 9 months ago (2014-03-28 03:59:00 UTC) #13
commit-bot: I haz the power
Change committed as 170261
6 years, 9 months ago (2014-03-28 04:14:03 UTC) #14
enne (OOO)
A revert of this CL has been created in https://codereview.chromium.org/217053007/ by enne@chromium.org. The reason for ...
6 years, 9 months ago (2014-03-28 19:23:24 UTC) #15
haraken
6 years, 9 months ago (2014-03-29 01:48:19 UTC) #16
Message was sent while issue was closed.
On 2014/03/28 19:23:24, enne wrote:
> A revert of this CL has been created in
> https://codereview.chromium.org/217053007/ by mailto:enne@chromium.org.
> 
> The reason for reverting is: Likely to have caused memory leaks:
>
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Te...
> 
> (1)
> Direct leak of 32 byte(s) in 1 object(s) allocated from:
>     #0 0x4b50d1 in operator new(unsigned long)
>
/usr/local/google/home/hwennborg/chromium/src/third_party/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
>     #1 0x9bdfd8a in
> WebCore::V8PerContextDataHolder::install(v8::Handle<v8::Context>,
> WTF::PassRefPtr<WebCore::DOMWrapperWorld>)
> third_party/WebKit/Source/bindings/v8/V8PerContextData.cpp:56
>     #2 0x9bdfa06 in
> WebCore::V8PerContextData::V8PerContextData(v8::Handle<v8::Context>,
> WTF::PassRefPtr<WebCore::DOMWrapperWorld>)
> third_party/WebKit/Source/bindings/v8/V8PerContextData.cpp:108
>     #3 0x9bc1afd in WebCore::V8PerContextData::create(v8::Handle<v8::Context>,
> WTF::PassRefPtr<WebCore::DOMWrapperWorld>)
> third_party/WebKit/Source/bindings/v8/V8PerContextData.h:66:16
>     #4 0x9be64fc in WebCore::V8PerIsolateData::ensureDomInJSContext()
> third_party/WebKit/Source/bindings/v8/V8PerIsolateData.cpp:132
> 
> (2)
> Indirect leak of 40 byte(s) in 1 object(s) allocated from:
>     #0 0x4b50d1 in operator new(unsigned long)
>
/usr/local/google/home/hwennborg/chromium/src/third_party/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
>     #1 0x9b2ee18 in operator new
> third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp:59:22
>     #2 0x9b2ee18 in WebCore::DOMWrapperWorld::create(int, int)
> third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp:53
>     #3 0x9be64e7 in WebCore::V8PerIsolateData::ensureDomInJSContext()
> third_party/WebKit/Source/bindings/v8/V8PerIsolateData.cpp:132
>  
> (3)
> Indirect leak of 24 byte(s) in 1 object(s) allocated from:
>     #0 0x4b46c1 in __interceptor_malloc
>
/usr/local/google/home/hwennborg/chromium/src/third_party/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:75
>     #1 0x62caf0a in partitionAllocGenericFlags
> third_party/WebKit/Source/wtf/PartitionAlloc.h:533
>     #2 0x62caf0a in partitionAllocGeneric
> third_party/WebKit/Source/wtf/PartitionAlloc.h:549
>     #3 0x62caf0a in WTF::fastMalloc(unsigned long)
> third_party/WebKit/Source/wtf/FastMalloc.cpp:125
>     #4 0x9b2ed61 in operator new
third_party/WebKit/Source/wtf/RefCounted.h:175
>     #5 0x9b2ed61 in WebCore::DOMWrapperWorld::create(int, int)
> third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp:53.

Thanks for gardening!

Actually these leaks are intentional ones. This CL changed method signatures, so
the existing leaks are reported as new leaks. Let me update leak suppression
files and reland the CL.

Powered by Google App Engine
This is Rietveld 408576698