-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of Make DOMWrapperWorld::current() return a reference instead …
…of a pointer (https://codereview.chromium.org/209713003/) Also reverting dependent patch https://codereview.chromium.org/213543004 Reason for revert: Likely to have caused memory leaks: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Tests%20%282%29/builds/989/steps/browser_tests/logs/stdio#failure1 (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 Original issue's 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 TBR=jochen@chromium.org,dcarney@chromium.org,abarth@chromium.org,haraken@chromium.org NOTREECHECKS=true NOTRY=true BUG=341032 Review URL: https://codereview.chromium.org/217053007 git-svn-id: svn://svn.chromium.org/blink/trunk@170357 bbb929c8-8fbe-4397-9dbb-9b2b20218538
- Loading branch information
enne@chromium.org
committed
Mar 28, 2014
1 parent
436d75f
commit 0f588d3
Showing
118 changed files
with
16,430 additions
and
7,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2011 Google Inc. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of | ||
* its contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | ||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | ||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
interface TestEventTarget : EventTarget { | ||
getter Node item(unsigned long index); | ||
[StrictTypeChecking] setter Node (unsigned long index, Node? node); | ||
[RaisesException] deleter boolean (unsigned long index); | ||
|
||
getter Node namedItem(DOMString name); | ||
setter Node (DOMString name, DOMString value); | ||
deleter boolean (DOMString name); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,43 @@ | ||
/* | ||
* Copyright (C) 2013 Google Inc. All rights reserved. | ||
* Copyright (C) 2010 Google Inc. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are | ||
* met: | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following disclaimer | ||
* in the documentation and/or other materials provided with the | ||
* distribution. | ||
* * Neither the name of Google Inc. nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of | ||
* its contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | ||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | ||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
// Test for interface extended attributes and special operations. | ||
// Also used as a target by TestObject | ||
|
||
// This IDL file is for testing the bindings code generator and for tracking | ||
// changes in its ouput. | ||
[ | ||
ActiveDOMObject, | ||
Conditional=CONDITION, | ||
Custom=LegacyCallAsFunction|ToV8, | ||
DoNotCheckConstants, | ||
ImplementedAs=TestInterfaceImplementation, | ||
RuntimeEnabled=FeatureName, | ||
SetWrapperReferenceTo(TestInterface referencedName), | ||
StrictTypeChecking, | ||
] interface TestInterface : TestInterfaceEmpty { | ||
// members needed to test [ImplementedAs], as this affect attribute | ||
// configuration and method configuration, and [StrictTypeChecking] | ||
// constants also needed for [DoNotCheckConstants] | ||
const unsigned long UNSIGNED_LONG = 0; | ||
[Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; | ||
|
||
attribute TestInterface testInterfaceAttribute; // Self-referential interface type with [ImplementedAs] | ||
attribute TestImplementedAsConstructor testImplementedAsConstructorAttribute; | ||
static attribute DOMString staticStringAttribute; | ||
|
||
void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg); | ||
[PerWorldBindings] attribute DOMString perWorldBindingsStringAttribute; | ||
[PerWorldBindings] void voidMethod(); | ||
|
||
// Anonymous indexed property operations | ||
getter DOMString (unsigned long index); | ||
setter DOMString (unsigned long index, DOMString value); | ||
deleter boolean (unsigned long index); | ||
|
||
// Anonymous named property operations | ||
getter DOMString (DOMString name); | ||
setter DOMString (DOMString name, DOMString value); | ||
deleter boolean (DOMString name); | ||
Conditional=Condition1|Condition2, | ||
ConstructorCallWith=ExecutionContext, | ||
Constructor(DOMString str1, [Default=Undefined] optional DOMString str2), | ||
RaisesException=Constructor, | ||
SetWrapperReferenceTo(TestObject referencedName), | ||
] interface TestInterface { | ||
[ImplementedAs=getItem] getter (Node or NodeList) namedItem(DOMString name); | ||
[Custom] setter Node (DOMString name, Node value); | ||
}; | ||
|
||
TestInterface implements TestImplements; | ||
TestInterface implements TestImplements2; | ||
TestInterface implements TestImplements3; |
36 changes: 36 additions & 0 deletions
36
Source/bindings/tests/idls/TestInterfaceDoNotCheckConstants.idl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (C) 2013 Google Inc. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are | ||
* met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following disclaimer | ||
* in the documentation and/or other materials provided with the | ||
* distribution. | ||
* * Neither the name of Google Inc. nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
[ | ||
DoNotCheckConstants, | ||
] interface TestInterfaceDoNotCheckConstants { | ||
const unsigned short CONST_VALUE_0 = 0; | ||
[Reflect=CONST_CPP] const short CONST_JAVASCRIPT = 1; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (C) 2013 Google Inc. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are | ||
* met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following disclaimer | ||
* in the documentation and/or other materials provided with the | ||
* distribution. | ||
* * Neither the name of Google Inc. nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
[ | ||
ActiveDOMObject, | ||
Conditional=CONDITION, | ||
Custom=LegacyCallAsFunction|ToV8, | ||
ImplementedAs=TestInterfacePythonImplementation, | ||
RuntimeEnabled=FeatureName, | ||
SetWrapperReferenceTo(TestInterfacePython referencedName), | ||
StrictTypeChecking, | ||
] interface TestInterfacePython : TestInterfaceEmpty { | ||
// members needed to test [ImplementedAs], as this affect attribute | ||
// configuration and method configuration, and [StrictTypeChecking] | ||
const unsigned long UNSIGNED_LONG = 0; | ||
attribute TestInterfacePython testInterfacePythonAttribute; // Self-referential interface type with [ImplementedAs] | ||
attribute TestImplementedAsConstructor testImplementedAsConstructorAttribute; | ||
static attribute DOMString staticStringAttribute; | ||
void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg); | ||
[PerWorldBindings] attribute DOMString perWorldBindingsStringAttribute; | ||
[PerWorldBindings] void voidMethod(); | ||
}; | ||
|
||
TestInterfacePython implements TestImplements; | ||
TestInterfacePython implements TestImplements2; | ||
TestInterfacePython implements TestImplements3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (C) 2013 Google Inc. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are | ||
* met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following disclaimer | ||
* in the documentation and/or other materials provided with the | ||
* distribution. | ||
* * Neither the name of Google Inc. nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
// This is for interface extended attributes that interact with another extended | ||
// attribute, and thus both cannot be tested at once. | ||
// The more *minor* extended attribute should be put in this file. | ||
|
||
[ | ||
Custom=VisitDOMWrapper, // Conflict with [SetWrapperReferenceTo] and [SetWrapperReferenceFrom] | ||
] interface TestInterfacePython3 { | ||
}; |
Oops, something went wrong.