Changeset 125995 in webkit
- Timestamp:
- Aug 19, 2012 9:39:48 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 14 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r125993 r125995 1 2012-08-19 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Rename SafeAllocation to V8ObjectConstructor 4 https://bugs.webkit.org/show_bug.cgi?id=94436 5 6 Reviewed by Adam Barth. 7 8 For clarification. 9 10 No tests. No change in behavior. 11 12 * UseV8.cmake: 13 * WebCore.gypi: 14 * bindings/v8/ScriptFunctionCall.cpp: 15 (WebCore::ScriptFunctionCall::construct): 16 * bindings/v8/V8Binding.cpp: 17 (WebCore::createRawTemplate): 18 * bindings/v8/V8Binding.h: 19 * bindings/v8/V8DOMWindowShell.cpp: 20 (WebCore::V8DOMWindowShell::installDOMWindow): 21 * bindings/v8/V8DOMWrapper.cpp: 22 (WebCore::V8DOMWrapper::instantiateV8Object): 23 * bindings/v8/V8NPObject.cpp: 24 (WebCore::createV8ObjectForNPObject): 25 * bindings/v8/V8ObjectConstructor.cpp: Renamed from Source/WebCore/bindings/v8/SafeAllocation.cpp. 26 (WebCore): 27 (WebCore::V8ObjectConstructor::isValidConstructorMode): 28 * bindings/v8/V8ObjectConstructor.h: Renamed from Source/WebCore/bindings/v8/SafeAllocation.h. 29 (WebCore): 30 (ConstructorMode): 31 (WebCore::ConstructorMode::ConstructorMode): 32 (WebCore::ConstructorMode::~ConstructorMode): 33 (WebCore::ConstructorMode::current): 34 (V8ObjectConstructor): 35 (WebCore::V8ObjectConstructor::newInstance): 36 * bindings/v8/V8PerContextData.cpp: 37 (WebCore::V8PerContextData::createWrapperFromCacheSlowCase): 38 * bindings/v8/WorkerContextExecutionProxy.cpp: 39 (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): 40 * bindings/v8/custom/V8InjectedScriptManager.cpp: 41 (WebCore::createInjectedScriptHostV8Wrapper): 42 * bindings/v8/custom/V8ScriptProfileCustom.cpp: 43 (WebCore::toV8): 44 * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: 45 (WebCore::toV8): 46 1 47 2012-08-19 Kentaro Hara <haraken@chromium.org> 2 48 -
trunk/Source/WebCore/UseV8.cmake
r125884 r125995 29 29 bindings/v8/PageScriptDebugServer.cpp 30 30 bindings/v8/RetainedDOMInfo.cpp 31 bindings/v8/SafeAllocation.cpp32 31 bindings/v8/ScheduledAction.cpp 33 32 bindings/v8/ScopedDOMDataStore.cpp … … 60 59 bindings/v8/V8LazyEventListener.cpp 61 60 bindings/v8/V8NodeFilterCondition.cpp 61 bindings/v8/V8ObjectConstructor.cpp 62 62 bindings/v8/V8PerContextData.cpp 63 63 bindings/v8/V8PerIsolateData.cpp -
trunk/Source/WebCore/WebCore.gypi
r125980 r125995 2197 2197 'bindings/v8/RetainedDOMInfo.h', 2198 2198 'bindings/v8/RetainedObjectInfo.h', 2199 'bindings/v8/SafeAllocation.cpp',2200 'bindings/v8/SafeAllocation.h',2201 2199 'bindings/v8/ScheduledAction.cpp', 2202 2200 'bindings/v8/ScheduledAction.h', … … 2279 2277 'bindings/v8/V8NodeFilterCondition.cpp', 2280 2278 'bindings/v8/V8NodeFilterCondition.h', 2279 'bindings/v8/V8ObjectConstructor.cpp', 2280 'bindings/v8/V8ObjectConstructor.h', 2281 2281 'bindings/v8/V8PerContextData.cpp', 2282 2282 'bindings/v8/V8PerContextData.h', -
trunk/Source/WebCore/bindings/v8/ScriptFunctionCall.cpp
r120791 r125995 32 32 #include "ScriptFunctionCall.h" 33 33 34 #include "SafeAllocation.h"35 34 #include "ScriptScope.h" 36 35 #include "ScriptState.h" 37 36 #include "ScriptValue.h" 38 37 #include "V8Binding.h" 38 #include "V8ObjectConstructor.h" 39 39 #include "V8Proxy.h" 40 40 #include "V8RecursionScope.h" … … 169 169 args[i] = m_arguments[i].v8Value(); 170 170 171 v8::Local<v8::Object> result = SafeAllocation::newInstance(constructor, m_arguments.size(), args.get());171 v8::Local<v8::Object> result = V8ObjectConstructor::newInstance(constructor, m_arguments.size(), args.get()); 172 172 if (!scope.success()) { 173 173 hadException = true; -
trunk/Source/WebCore/bindings/v8/V8Binding.cpp
r125495 r125995 38 38 #include "PlatformString.h" 39 39 #include "QualifiedName.h" 40 #include "SafeAllocation.h"41 40 #include "V8DOMStringList.h" 42 41 #include "V8Element.h" 42 #include "V8ObjectConstructor.h" 43 43 #include "V8Proxy.h" 44 44 … … 318 318 { 319 319 v8::HandleScope scope; 320 v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New( SafeAllocation::isValidConstructorMode);320 v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(V8ObjectConstructor::isValidConstructorMode); 321 321 return v8::Persistent<v8::FunctionTemplate>::New(result); 322 322 } -
trunk/Source/WebCore/bindings/v8/V8Binding.h
r125993 r125995 34 34 #include "BindingSecurity.h" 35 35 #include "Document.h" 36 #include "SafeAllocation.h"37 36 #include "V8BindingMacros.h" 38 37 #include "V8DOMConfiguration.h" … … 40 39 #include "V8DOMWrapper.h" 41 40 #include "V8HiddenPropertyName.h" 41 #include "V8ObjectConstructor.h" 42 42 #include "V8PerIsolateData.h" 43 43 #include "V8Proxy.h" -
trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
r125656 r125995 43 43 #include "PlatformSupport.h" 44 44 #include "RuntimeEnabledFeatures.h" 45 #include "SafeAllocation.h"46 45 #include "ScriptCallStack.h" 47 46 #include "ScriptCallStackFactory.h" … … 60 59 #include "V8History.h" 61 60 #include "V8Location.h" 61 #include "V8ObjectConstructor.h" 62 62 #include "V8PerContextData.h" 63 63 #include "V8Proxy.h" … … 411 411 // Create a new JS window object and use it as the prototype for the shadow global object. 412 412 v8::Handle<v8::Function> windowConstructor = V8DOMWrapper::constructorForType(&V8DOMWindow::info, window); 413 v8::Local<v8::Object> jsWindow = SafeAllocation::newInstance(windowConstructor);413 v8::Local<v8::Object> jsWindow = V8ObjectConstructor::newInstance(windowConstructor); 414 414 // Bail out if allocation failed. 415 415 if (jsWindow.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
r125242 r125995 38 38 #include "Frame.h" 39 39 #include "FrameLoaderClient.h" 40 #include "SafeAllocation.h"41 40 #include "StylePropertySet.h" 42 41 #include "V8AbstractEventListener.h" … … 52 51 #include "V8NodeFilterCondition.h" 53 52 #include "V8NodeList.h" 53 #include "V8ObjectConstructor.h" 54 54 #include "V8PerContextData.h" 55 55 #include "V8Proxy.h" … … 206 206 else { 207 207 v8::Local<v8::Function> function = type->getTemplate()->GetFunction(); 208 instance = SafeAllocation::newInstance(function);208 instance = V8ObjectConstructor::newInstance(function); 209 209 } 210 210 -
trunk/Source/WebCore/bindings/v8/V8NPObject.cpp
r125495 r125995 35 35 #include "HTMLPlugInElement.h" 36 36 #include "NPV8Object.h" 37 #include "SafeAllocation.h"38 37 #include "V8Binding.h" 39 38 #include "V8DOMMap.h" … … 42 41 #include "V8HTMLObjectElement.h" 43 42 #include "V8NPUtils.h" 43 #include "V8ObjectConstructor.h" 44 44 #include "V8Proxy.h" 45 45 #include "npruntime_impl.h" … … 408 408 409 409 v8::Handle<v8::Function> v8Function = npObjectDesc->GetFunction(); 410 v8::Local<v8::Object> value = SafeAllocation::newInstance(v8Function);410 v8::Local<v8::Object> value = V8ObjectConstructor::newInstance(v8Function); 411 411 412 412 // If we were unable to allocate the instance, we avoid wrapping and registering the NP object. -
trunk/Source/WebCore/bindings/v8/V8ObjectConstructor.cpp
r125994 r125995 24 24 25 25 #include "config.h" 26 #include " SafeAllocation.h"26 #include "V8ObjectConstructor.h" 27 27 28 28 #include "V8Binding.h" … … 30 30 namespace WebCore { 31 31 32 v8::Handle<v8::Value> SafeAllocation::isValidConstructorMode(const v8::Arguments& args)32 v8::Handle<v8::Value> V8ObjectConstructor::isValidConstructorMode(const v8::Arguments& args) 33 33 { 34 34 if (ConstructorMode::current() == ConstructorMode::CreateNewObject) -
trunk/Source/WebCore/bindings/v8/V8ObjectConstructor.h
r125994 r125995 29 29 */ 30 30 31 #ifndef SafeAllocation_h32 #define SafeAllocation_h31 #ifndef V8ObjectConstructor_h 32 #define V8ObjectConstructor_h 33 33 34 34 #include "V8PerIsolateData.h" … … 65 65 }; 66 66 67 class SafeAllocation{67 class V8ObjectConstructor { 68 68 public: 69 69 static inline v8::Local<v8::Object> newInstance(v8::Handle<v8::Function>); … … 74 74 }; 75 75 76 v8::Local<v8::Object> SafeAllocation::newInstance(v8::Handle<v8::Function> function)76 v8::Local<v8::Object> V8ObjectConstructor::newInstance(v8::Handle<v8::Function> function) 77 77 { 78 78 if (function.IsEmpty()) … … 83 83 } 84 84 85 v8::Local<v8::Object> SafeAllocation::newInstance(v8::Handle<v8::ObjectTemplate> objectTemplate)85 v8::Local<v8::Object> V8ObjectConstructor::newInstance(v8::Handle<v8::ObjectTemplate> objectTemplate) 86 86 { 87 87 if (objectTemplate.IsEmpty()) … … 92 92 } 93 93 94 v8::Local<v8::Object> SafeAllocation::newInstance(v8::Handle<v8::Function> function, int argc, v8::Handle<v8::Value> argv[])94 v8::Local<v8::Object> V8ObjectConstructor::newInstance(v8::Handle<v8::Function> function, int argc, v8::Handle<v8::Value> argv[]) 95 95 { 96 96 if (function.IsEmpty()) … … 103 103 } // namespace WebCore 104 104 105 #endif // SafeAllocation_h105 #endif // V8ObjectConstructor_h -
trunk/Source/WebCore/bindings/v8/V8PerContextData.cpp
r125242 r125995 32 32 #include "V8PerContextData.h" 33 33 34 #include " SafeAllocation.h"34 #include "V8ObjectConstructor.h" 35 35 36 36 namespace WebCore { … … 93 93 v8::Context::Scope scope(m_context); 94 94 v8::Local<v8::Function> function = constructorForType(type); 95 v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);95 v8::Local<v8::Object> instance = V8ObjectConstructor::newInstance(function); 96 96 if (!instance.IsEmpty()) { 97 97 m_wrapperBoilerplates.set(type, v8::Persistent<v8::Object>::New(instance)); -
trunk/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
r125495 r125995 38 38 #include "DedicatedWorkerContext.h" 39 39 #include "Event.h" 40 #include "SafeAllocation.h"41 40 #include "ScriptCallStack.h" 42 41 #include "SharedWorker.h" … … 46 45 #include "V8DOMWindowShell.h" 47 46 #include "V8DedicatedWorkerContext.h" 47 #include "V8ObjectConstructor.h" 48 48 #include "V8PerContextData.h" 49 49 #include "V8Proxy.h" … … 174 174 #endif 175 175 v8::Handle<v8::Function> workerContextConstructor = m_perContextData->constructorForType(contextType); 176 v8::Local<v8::Object> jsWorkerContext = SafeAllocation::newInstance(workerContextConstructor);176 v8::Local<v8::Object> jsWorkerContext = V8ObjectConstructor::newInstance(workerContextConstructor); 177 177 // Bail out if allocation failed. 178 178 if (jsWorkerContext.IsEmpty()) { -
trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptManager.cpp
r124847 r125995 36 36 #include "DOMWindow.h" 37 37 #include "InjectedScriptHost.h" 38 #include "SafeAllocation.h"39 38 #include "ScriptObject.h" 40 39 #include "V8Binding.h" … … 60 59 return v8::Local<v8::Object>(); 61 60 } 62 v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);61 v8::Local<v8::Object> instance = V8ObjectConstructor::newInstance(function); 63 62 if (instance.IsEmpty()) { 64 63 // Avoid setting the wrapper if allocation failed. -
trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp
r124938 r125995 33 33 #include "V8ScriptProfile.h" 34 34 35 #include "SafeAllocation.h"36 35 #include "ScriptProfile.h" 37 36 #include "V8Binding.h" … … 51 50 return v8Undefined(); 52 51 } 53 v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);52 v8::Local<v8::Object> instance = V8ObjectConstructor::newInstance(function); 54 53 if (instance.IsEmpty()) { 55 54 // Avoid setting the wrapper if allocation failed. -
trunk/Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp
r124938 r125995 33 33 #include "V8ScriptProfileNode.h" 34 34 35 #include "SafeAllocation.h"36 35 #include "ScriptProfileNode.h" 37 36 #include "V8Binding.h" … … 58 57 return v8Undefined(); 59 58 } 60 v8::Local<v8::Object> instance = SafeAllocation::newInstance(function);59 v8::Local<v8::Object> instance = V8ObjectConstructor::newInstance(function); 61 60 if (instance.IsEmpty()) { 62 61 // Avoid setting the wrapper if allocation failed.
Note: See TracChangeset
for help on using the changeset viewer.