Changeset 140392 in webkit
- Timestamp:
- Jan 22, 2013, 12:32:01 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140391 r140392 1 2013-01-22 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Pass an Isolate to toV8() 4 https://bugs.webkit.org/show_bug.cgi?id=107512 5 6 Reviewed by Adam Barth. 7 8 By using Context::GetIsolate(), this patch passes an Isolate to toV8(). 9 10 No tests. No change in behavior. 11 12 * bindings/v8/IDBBindingUtilities.cpp: 13 (WebCore::injectIDBKeyIntoScriptValue): 14 (WebCore::idbKeyToScriptValue): 15 * bindings/v8/ScriptController.cpp: 16 (WebCore::createScriptObject): 17 (WebCore::ScriptController::createScriptObjectForPluginElement): 18 * bindings/v8/ScriptDebugServer.cpp: 19 (WebCore::ScriptDebugServer::currentCallFrame): 20 * bindings/v8/ScriptObject.cpp: 21 (WebCore::ScriptGlobalObject::set): 22 * bindings/v8/V8AbstractEventListener.cpp: 23 (WebCore::V8AbstractEventListener::handleEvent): 24 * bindings/v8/V8DOMWindowShell.cpp: 25 (WebCore::V8DOMWindowShell::updateDocumentProperty): 26 * bindings/v8/V8MutationCallback.cpp: 27 (WebCore::V8MutationCallback::handleEvent): 28 * bindings/v8/V8NodeFilterCondition.cpp: 29 (WebCore::V8NodeFilterCondition::acceptNode): 30 * bindings/v8/V8WorkerContextEventListener.cpp: 31 (WebCore::V8WorkerContextEventListener::handleEvent): 32 * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: 33 (WebCore::V8SQLStatementErrorCallback::handleEvent): 34 * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: 35 (WebCore::InjectedScriptHost::nodeAsScriptValue): 36 1 37 2013-01-22 Sergey Ryazanov <serya@chromium.org> 2 38 -
trunk/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
r139900 r140392 29 29 #if ENABLE(INDEXED_DATABASE) 30 30 31 #include "DOMRequestState.h" 31 32 #include "IDBKey.h" 32 33 #include "IDBKeyPath.h" … … 222 223 } 223 224 224 bool injectIDBKeyIntoScriptValue(DOMRequestState* , PassRefPtr<IDBKey> key, ScriptValue& value, const IDBKeyPath& keyPath)225 bool injectIDBKeyIntoScriptValue(DOMRequestState* state, PassRefPtr<IDBKey> key, ScriptValue& value, const IDBKeyPath& keyPath) 225 226 { 226 227 IDB_TRACE("injectIDBKeyIntoScriptValue"); … … 242 243 return false; 243 244 244 if (!set(parent, keyPathElements.last(), toV8(key.get(), v8::Handle<v8::Object>() )))245 if (!set(parent, keyPathElements.last(), toV8(key.get(), v8::Handle<v8::Object>(), state->context()->GetIsolate()))) 245 246 return false; 246 247 … … 268 269 ASSERT(v8::Context::InContext()); 269 270 v8::HandleScope handleScope; 270 v8::Handle<v8::Value> v8Value(toV8(key.get(), v8::Handle<v8::Object>() ));271 v8::Handle<v8::Value> v8Value(toV8(key.get(), v8::Handle<v8::Object>(), state->context()->GetIsolate())); 271 272 return ScriptValue(v8Value); 272 273 } -
trunk/Source/WebCore/bindings/v8/ScriptController.cpp
r139900 r140392 617 617 v8::Context::Scope scope(v8Context); 618 618 DOMWindow* window = frame->document()->domWindow(); 619 v8::Handle<v8::Value> global = toV8(window, v8::Handle<v8::Object>() );619 v8::Handle<v8::Value> global = toV8(window, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 620 620 ASSERT(global->IsObject()); 621 621 return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(global), window); … … 657 657 658 658 DOMWindow* window = m_frame->document()->domWindow(); 659 v8::Handle<v8::Value> v8plugin = toV8(static_cast<HTMLEmbedElement*>(plugin), v8::Handle<v8::Object>() );659 v8::Handle<v8::Value> v8plugin = toV8(static_cast<HTMLEmbedElement*>(plugin), v8::Handle<v8::Object>(), v8Context->GetIsolate()); 660 660 if (!v8plugin->IsObject()) 661 661 return createNoScriptObject(); -
trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
r139900 r140392 386 386 RefPtr<JavaScriptCallFrame> currentCallFrame = JavaScriptCallFrame::create(v8::Debug::GetDebugContext(), v8::Handle<v8::Object>::Cast(currentCallFrameV8)); 387 387 v8::Context::Scope contextScope(m_pausedContext); 388 return ScriptValue(toV8(currentCallFrame.release(), v8::Handle<v8::Object>() ));388 return ScriptValue(toV8(currentCallFrame.release(), v8::Handle<v8::Object>(), m_pausedContext->GetIsolate())); 389 389 } 390 390 -
trunk/Source/WebCore/bindings/v8/ScriptObject.cpp
r139900 r140392 74 74 { 75 75 ScriptScope scope(scriptState); 76 scope.global()->Set(v8::String::NewSymbol(name), toV8(value, v8::Handle<v8::Object>() ));76 scope.global()->Set(v8::String::NewSymbol(name), toV8(value, v8::Handle<v8::Object>(), scriptState->isolate())); 77 77 return scope.success(); 78 78 } … … 81 81 { 82 82 ScriptScope scope(scriptState); 83 scope.global()->Set(v8::String::NewSymbol(name), toV8(value, v8::Handle<v8::Object>() ));83 scope.global()->Set(v8::String::NewSymbol(name), toV8(value, v8::Handle<v8::Object>(), scriptState->isolate())); 84 84 return scope.success(); 85 85 } -
trunk/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp
r139900 r140392 97 97 98 98 // Get the V8 wrapper for the event object. 99 v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>() );99 v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 100 100 ASSERT(!jsEvent.IsEmpty()); 101 101 -
trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
r140288 r140392 355 355 v8::Context::Scope contextScope(m_context.get()); 356 356 357 v8::Handle<v8::Value> documentWrapper = toV8(m_frame->document(), v8::Handle<v8::Object>() );357 v8::Handle<v8::Value> documentWrapper = toV8(m_frame->document(), v8::Handle<v8::Object>(), m_context.get()->GetIsolate()); 358 358 ASSERT(documentWrapper == m_document.get() || m_document.isEmpty()); 359 359 if (m_document.isEmpty()) -
trunk/Source/WebCore/bindings/v8/V8MutationCallback.cpp
r139900 r140392 64 64 v8::Local<v8::Array> mutationsArray = v8::Array::New(mutations->size()); 65 65 for (size_t i = 0; i < mutations->size(); ++i) 66 mutationsArray->Set(deprecatedV8Integer(i), toV8(mutations->at(i).get(), v8::Handle<v8::Object>() ));66 mutationsArray->Set(deprecatedV8Integer(i), toV8(mutations->at(i).get(), v8::Handle<v8::Object>(), v8Context->GetIsolate())); 67 67 68 v8::Handle<v8::Value> observerHandle = toV8(observer, v8::Handle<v8::Object>() );68 v8::Handle<v8::Value> observerHandle = toV8(observer, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 69 69 if (observerHandle.IsEmpty()) { 70 70 if (!isScriptControllerTerminating()) -
trunk/Source/WebCore/bindings/v8/V8NodeFilterCondition.cpp
r139900 r140392 71 71 } 72 72 73 OwnArrayPtr<v8::Handle<v8::Value> > args = adoptArrayPtr(new v8::Handle<v8::Value>[1]); 74 args[0] = toV8(node, v8::Handle<v8::Object>(), state->isolate()); 75 73 76 v8::Handle<v8::Object> object = v8::Context::GetCurrent()->Global(); 74 OwnArrayPtr<v8::Handle<v8::Value> > args = adoptArrayPtr(new v8::Handle<v8::Value>[1]);75 args[0] = toV8(node, v8::Handle<v8::Object>());76 77 77 v8::Handle<v8::Value> result = ScriptController::callFunctionWithInstrumentation(0, callback, object, 1, args.get()); 78 78 -
trunk/Source/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
r139900 r140392 76 76 77 77 // Get the V8 wrapper for the event object. 78 v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>() );78 v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 79 79 80 80 invokeEventHandler(context, event, jsEvent); -
trunk/Source/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
r139900 r140392 56 56 v8::Context::Scope scope(v8Context); 57 57 58 v8::Handle<v8::Value> transactionHandle = toV8(transaction, v8::Handle<v8::Object>() );59 v8::Handle<v8::Value> errorHandle = toV8(error, v8::Handle<v8::Object>() );58 v8::Handle<v8::Value> transactionHandle = toV8(transaction, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 59 v8::Handle<v8::Value> errorHandle = toV8(error, v8::Handle<v8::Object>(), v8Context->GetIsolate()); 60 60 if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) { 61 61 if (!isScriptControllerTerminating()) -
trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
r139900 r140392 77 77 if (!BindingSecurity::shouldAllowAccessToNode(BindingState::instance(), node)) 78 78 return ScriptValue(v8::Null()); 79 return ScriptValue(toV8(node, v8::Handle<v8::Object>() ));79 return ScriptValue(toV8(node, v8::Handle<v8::Object>(), context->GetIsolate())); 80 80 } 81 81
Note:
See TracChangeset
for help on using the changeset viewer.