Commit 9c5a91f3 authored by japhet@chromium.org's avatar japhet@chromium.org

2009-06-26 Nate Chapin <japhet@chromium.org>

        Reviewed by David Levin.

        Upstream V8Proxy.  This involved updating a lot of function and variable names to match WebKit style, hence the large size.

        https://bugs.webkit.org/show_bug.cgi?id=26623



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3628ca77
2009-06-26 Nate Chapin <japhet@chromium.org>
Reviewed by David Levin.
Upstream V8Proxy. This involved updating a lot of function and variable names to match WebKit style, hence the large size.
https://bugs.webkit.org/show_bug.cgi?id=26623
* bindings/v8/ScheduledAction.cpp:
(WebCore::ScheduledAction::ScheduledAction):
(WebCore::ScheduledAction::~ScheduledAction):
(WebCore::ScheduledAction::execute):
* bindings/v8/ScriptCallStack.cpp:
(WebCore::ScriptCallStack::ScriptCallStack):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::isSafeScript):
(WebCore::ScriptController::gcProtectJSWrapper):
(WebCore::ScriptController::gcUnprotectJSWrapper):
(WebCore::ScriptController::processingUserGesture):
(WebCore::ScriptController::evaluate):
(WebCore::ScriptController::setEventHandlerLineNumber):
(WebCore::ScriptController::bindToWindowObject):
(WebCore::ScriptController::collectGarbage):
(WebCore::ScriptController::haveInterpreter):
(WebCore::createScriptObject):
(WebCore::ScriptController::createScriptObjectForPluginElement):
* bindings/v8/ScriptInstance.cpp:
(WebCore::V8ScriptInstance::clear):
(WebCore::V8ScriptInstance::set):
* bindings/v8/ScriptObject.cpp:
(WebCore::ScriptGlobalObject::set):
* bindings/v8/ScriptObjectQuarantine.cpp:
(WebCore::getQuarantinedScriptObject):
* bindings/v8/ScriptScope.cpp:
(WebCore::ScriptScope::ScriptScope):
* bindings/v8/ScriptValue.h:
(WebCore::ScriptValue::ScriptValue):
(WebCore::ScriptValue::operator=):
(WebCore::ScriptValue::clear):
* bindings/v8/V8AbstractEventListener.cpp:
(WebCore::V8AbstractEventListener::invokeEventHandler):
(WebCore::V8AbstractEventListener::handleEvent):
(WebCore::V8AbstractEventListener::disposeListenerObject):
(WebCore::V8AbstractEventListener::getReceiverObject):
* bindings/v8/V8Collection.cpp:
(WebCore::toOptionsCollectionSetter):
* bindings/v8/V8Collection.h:
(WebCore::getV8Object):
(WebCore::getNamedPropertyOfCollection):
(WebCore::nodeCollectionNamedPropertyGetter):
(WebCore::getIndexedPropertyOfCollection):
(WebCore::nodeCollectionIndexedPropertyGetter):
(WebCore::nodeCollectionIndexedPropertyEnumerator):
(WebCore::collectionIndexedPropertyEnumerator):
(WebCore::collectionStringOrNullIndexedPropertyGetter):
* bindings/v8/V8DOMMap.cpp:
(WebCore::weakDOMObjectCallback):
(WebCore::DOMData::removeObjectsFromWrapperMap):
* bindings/v8/V8Helpers.cpp:
(WebCore::wrapNPObject):
(WebCore::toV8Context):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::~V8LazyEventListener):
(WebCore::V8LazyEventListener::getListenerFunction):
(WebCore::V8LazyEventListener::callListenerFunction):
(WebCore::V8LazyEventListener::getWrappedListenerFunction):
* bindings/v8/V8NodeFilterCondition.cpp:
(WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
(WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
(WebCore::V8NodeFilterCondition::acceptNode):
* bindings/v8/V8ObjectEventListener.cpp:
(WebCore::weakObjectEventListenerCallback):
(WebCore::V8ObjectEventListener::~V8ObjectEventListener):
* bindings/v8/V8Proxy.cpp: Added.
* bindings/v8/V8Proxy.h:
(WebCore::):
(WebCore::GlobalHandleInfo::GlobalHandleInfo):
(WebCore::V8Proxy::):
(WebCore::V8Proxy::V8Proxy):
(WebCore::V8Proxy::frame):
(WebCore::V8Proxy::inlineCode):
(WebCore::V8Proxy::setInlineCode):
(WebCore::V8Proxy::timerCallback):
(WebCore::V8Proxy::setTimerCallback):
(WebCore::V8Proxy::setEventHandlerLineNumber):
(WebCore::V8Proxy::finishedWithEvent):
(WebCore::V8Proxy::wrapCPointer):
(WebCore::V8Proxy::extractCPointer):
(WebCore::V8Proxy::convertDOMWrapperToNative):
(WebCore::V8Proxy::convertDOMWrapperToNode):
(WebCore::V8Proxy::convertToV8Object):
(WebCore::V8Proxy::convertToNativeObject):
(WebCore::V8Proxy::convertToNativeEvent):
(WebCore::V8Proxy::context):
(WebCore::V8Proxy::extractCPointerImpl):
(WebCore::V8Proxy::utilityContext):
(WebCore::V8Proxy::constructDOMObject):
(WebCore::throwError):
(WebCore::toV8):
* bindings/v8/V8Utilities.h:
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::retrieve):
(WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
(WebCore::WorkerContextExecutionProxy::GetConstructor):
(WebCore::WorkerContextExecutionProxy::ToV8Object):
(WebCore::WorkerContextExecutionProxy::EventToV8Object):
(WebCore::WorkerContextExecutionProxy::toV8):
(WebCore::WorkerContextExecutionProxy::forgetV8EventObject):
(WebCore::WorkerContextExecutionProxy::evaluate):
(WebCore::WorkerContextExecutionProxy::runScript):
* bindings/v8/custom/V8AttrCustom.cpp:
(WebCore::ACCESSOR_SETTER):
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::NAMED_PROPERTY_GETTER):
(WebCore::NAMED_PROPERTY_SETTER):
* bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
(WebCore::INDEXED_PROPERTY_GETTER):
(WebCore::INDEXED_PROPERTY_SETTER):
* bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
(WebCore::toV8):
(WebCore::toCanvasStyle):
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8ClientRectListCustom.cpp:
(WebCore::INDEXED_PROPERTY_GETTER):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::ACCESSOR_GETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8CustomBinding.cpp:
(WebCore::allowSettingFrameSrcToJavascriptUrl):
(WebCore::ACCESSOR_GETTER):
(WebCore::INDEXED_ACCESS_CHECK):
(WebCore::NAMED_ACCESS_CHECK):
(WebCore::V8Custom::GetTargetFrame):
* bindings/v8/custom/V8CustomEventListener.cpp:
(WebCore::V8EventListener::V8EventListener):
(WebCore::V8EventListener::~V8EventListener):
(WebCore::V8EventListener::callListenerFunction):
* bindings/v8/custom/V8CustomSQLStatementCallback.cpp:
(WebCore::V8CustomSQLStatementCallback::handleEvent):
* bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
(WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
* bindings/v8/custom/V8CustomSQLTransactionCallback.cpp:
(WebCore::V8CustomSQLTransactionCallback::handleEvent):
* bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp:
(WebCore::V8CustomSQLTransactionErrorCallback::handleEvent):
* bindings/v8/custom/V8CustomVoidCallback.cpp:
(WebCore::V8CustomVoidCallback::handleEvent):
(WebCore::invokeCallback):
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
* bindings/v8/custom/V8DOMParserConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8Custom::WindowSetTimeoutImpl):
(WebCore::convertBase64):
(WebCore::ACCESSOR_SETTER):
(WebCore::CALLBACK_FUNC_DECL):
(WebCore::ACCESSOR_GETTER):
(WebCore::createWindow):
(WebCore::INDEXED_PROPERTY_GETTER):
(WebCore::NAMED_PROPERTY_GETTER):
(WebCore::V8Custom::ClearTimeoutImpl):
(WebCore::NAMED_ACCESS_CHECK):
(WebCore::INDEXED_ACCESS_CHECK):
* bindings/v8/custom/V8DatabaseCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8DocumentLocationCustom.cpp:
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
* bindings/v8/custom/V8ElementCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
(WebCore::ACCESSOR_SETTER):
(WebCore::ACCESSOR_GETTER):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::ACCESSOR_SETTER):
(WebCore::ACCESSOR_GETTER):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::getNamedItems):
(WebCore::getItem):
(WebCore::NAMED_PROPERTY_GETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::NAMED_PROPERTY_GETTER):
(WebCore::CALLBACK_FUNC_DECL):
(WebCore::ACCESSOR_GETTER):
* bindings/v8/custom/V8HTMLFormElementCustom.cpp:
(WebCore::INDEXED_PROPERTY_GETTER):
(WebCore::NAMED_PROPERTY_GETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
(WebCore::ACCESSOR_SETTER):
* bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
(WebCore::NAMED_PROPERTY_GETTER):
* bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
(WebCore::ACCESSOR_SETTER):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8HTMLInputElementCustom.cpp:
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
(WebCore::INDEXED_PROPERTY_GETTER):
(WebCore::INDEXED_PROPERTY_SETTER):
* bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
(WebCore::NAMED_PROPERTY_GETTER):
(WebCore::NAMED_PROPERTY_SETTER):
(WebCore::INDEXED_PROPERTY_GETTER):
(WebCore::INDEXED_PROPERTY_SETTER):
* bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
(WebCore::NAMED_PROPERTY_GETTER):
(WebCore::INDEXED_PROPERTY_SETTER):
* bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
(WebCore::removeElement):
* bindings/v8/custom/V8InspectorControllerCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::ACCESSOR_SETTER):
(WebCore::ACCESSOR_GETTER):
(WebCore::CALLBACK_FUNC_DECL):
(WebCore::INDEXED_ACCESS_CHECK):
(WebCore::NAMED_ACCESS_CHECK):
* bindings/v8/custom/V8MessageChannelConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::INDEXED_PROPERTY_GETTER):
(WebCore::NAMED_PROPERTY_GETTER):
* bindings/v8/custom/V8NavigatorCustom.cpp:
(WebCore::ACCESSOR_GETTER):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8NodeIteratorCustom.cpp:
(WebCore::toV8):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8NodeListCustom.cpp:
(WebCore::NAMED_PROPERTY_GETTER):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8SQLTransactionCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8SVGLengthCustom.cpp:
(WebCore::ACCESSOR_GETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8SVGMatrixCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8StyleSheetListCustom.cpp:
(WebCore::NAMED_PROPERTY_GETTER):
* bindings/v8/custom/V8TreeWalkerCustom.cpp:
(WebCore::toV8):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8WebKitPointConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
(WebCore::SetTimeoutOrInterval):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
(WebCore::getEventListener):
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::getEventListener):
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
(WebCore::ACCESSOR_GETTER):
(WebCore::ACCESSOR_SETTER):
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8XMLSerializerConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8XPathEvaluatorConstructor.cpp:
(WebCore::CALLBACK_FUNC_DECL):
* bindings/v8/custom/V8XSLTProcessorCustom.cpp:
(WebCore::CALLBACK_FUNC_DECL):
2009-06-26 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim Hatcher.
......
......@@ -50,7 +50,7 @@ ScheduledAction::ScheduledAction(v8::Handle<v8::Function> func, int argc, v8::Ha
m_function = v8::Persistent<v8::Function>::New(func);
#ifndef NDEBUG
V8Proxy::RegisterGlobalHandle(SCHEDULED_ACTION, this, m_function);
V8Proxy::registerGlobalHandle(SCHEDULED_ACTION, this, m_function);
#endif
m_argc = argc;
......@@ -60,7 +60,7 @@ ScheduledAction::ScheduledAction(v8::Handle<v8::Function> func, int argc, v8::Ha
m_argv[i] = v8::Persistent<v8::Value>::New(argv[i]);
#ifndef NDEBUG
V8Proxy::RegisterGlobalHandle(SCHEDULED_ACTION, this, m_argv[i]);
V8Proxy::registerGlobalHandle(SCHEDULED_ACTION, this, m_argv[i]);
#endif
}
} else
......@@ -73,13 +73,13 @@ ScheduledAction::~ScheduledAction()
return;
#ifndef NDEBUG
V8Proxy::UnregisterGlobalHandle(this, m_function);
V8Proxy::unregisterGlobalHandle(this, m_function);
#endif
m_function.Dispose();
for (int i = 0; i < m_argc; i++) {
#ifndef NDEBUG
V8Proxy::UnregisterGlobalHandle(this, m_argv[i]);
V8Proxy::unregisterGlobalHandle(this, m_argv[i]);
#endif
m_argv[i].Dispose();
}
......@@ -106,7 +106,7 @@ void ScheduledAction::execute(V8Proxy* proxy)
ASSERT(proxy);
v8::HandleScope handleScope;
v8::Local<v8::Context> v8Context = proxy->GetContext();
v8::Local<v8::Context> v8Context = proxy->context();
if (v8Context.IsEmpty())
return; // JS may not be enabled.
......@@ -116,7 +116,7 @@ void ScheduledAction::execute(V8Proxy* proxy)
// FIXME: Need to implement timeouts for preempting a long-running script.
if (!m_function.IsEmpty() && m_function->IsFunction()) {
proxy->CallFunction(v8::Persistent<v8::Function>::Cast(m_function), v8Context->Global(), m_argc, m_argv);
proxy->callFunction(v8::Persistent<v8::Function>::Cast(m_function), v8Context->Global(), m_argc, m_argv);
Document::updateStyleForAllDocuments();
} else
proxy->evaluate(m_code, 0);
......
......@@ -39,7 +39,7 @@
namespace WebCore {
ScriptCallStack::ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount)
: m_lastCaller(String(), V8Proxy::GetSourceName(), V8Proxy::GetSourceLineNumber() + 1, arguments, skipArgumentCount)
: m_lastCaller(String(), V8Proxy::sourceName(), V8Proxy::sourceLineNumber() + 1, arguments, skipArgumentCount)
, m_scriptState(new ScriptState(V8Proxy::retrieveFrame()))
{
}
......
......@@ -72,17 +72,17 @@ Frame* ScriptController::retrieveFrameForCurrentContext()
bool ScriptController::isSafeScript(Frame* target)
{
return V8Proxy::CanAccessFrame(target, true);
return V8Proxy::canAccessFrame(target, true);
}
void ScriptController::gcProtectJSWrapper(void* domObject)
{
V8Proxy::GCProtect(domObject);
V8Proxy::gcProtect(domObject);
}
void ScriptController::gcUnprotectJSWrapper(void* domObject)
{
V8Proxy::GCUnprotect(domObject);
V8Proxy::gcUnprotect(domObject);
}
ScriptController::ScriptController(Frame* frame)
......@@ -144,18 +144,18 @@ bool ScriptController::processingUserGesture() const
V8Proxy* activeProxy = activeFrame->script()->proxy();
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::GetContext(activeFrame);
v8::Handle<v8::Context> v8Context = V8Proxy::context(activeFrame);
// FIXME: find all cases context can be empty:
// 1) JS is disabled;
// 2) page is NULL;
if (context.IsEmpty())
if (v8Context.IsEmpty())
return true;
v8::Context::Scope scope(context);
v8::Context::Scope scope(v8Context);
v8::Handle<v8::Object> global = context->Global();
v8::Handle<v8::Object> global = v8Context->Global();
v8::Handle<v8::Value> jsEvent = global->Get(v8::String::NewSymbol("event"));
Event* event = V8Proxy::ToNativeEvent(jsEvent);
Event* event = V8Proxy::convertToNativeEvent(jsEvent);
// Based on code from kjs_bindings.cpp.
// Note: This is more liberal than Firefox's implementation.
......@@ -199,11 +199,11 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
}
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::GetContext(m_proxy->frame());
if (context.IsEmpty())
v8::Handle<v8::Context> v8Context = V8Proxy::context(m_proxy->frame());
if (v8Context.IsEmpty())
return ScriptValue();
v8::Context::Scope scope(context);
v8::Context::Scope scope(v8Context);
RefPtr<Frame> protect(m_frame);
......@@ -221,7 +221,7 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
void ScriptController::setEventHandlerLineNumber(int lineNumber)
{
m_proxy->setEventHandlerLineno(lineNumber);
m_proxy->setEventHandlerLineNumber(lineNumber);
}
void ScriptController::finishedWithEvent(Event* event)
......@@ -234,34 +234,34 @@ void ScriptController::bindToWindowObject(Frame* frame, const String& key, NPObj
{
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::GetContext(frame);
if (context.IsEmpty())
v8::Handle<v8::Context> v8Context = V8Proxy::context(frame);
if (v8Context.IsEmpty())
return;
v8::Context::Scope scope(context);
v8::Context::Scope scope(v8Context);
v8::Handle<v8::Object> value = CreateV8ObjectForNPObject(object, 0);
// Attach to the global object.
v8::Handle<v8::Object> global = context->Global();
v8::Handle<v8::Object> global = v8Context->Global();
global->Set(v8String(key), value);
}
void ScriptController::collectGarbage()
{
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::GetContext(m_proxy->frame());
if (context.IsEmpty())
v8::Handle<v8::Context> v8Context = V8Proxy::context(m_proxy->frame());
if (v8Context.IsEmpty())
return;
v8::Context::Scope scope(context);
v8::Context::Scope scope(v8Context);
m_proxy->evaluate(ScriptSourceCode("if (window.gc) void(gc());"), 0);
}
bool ScriptController::haveInterpreter() const
{
return m_proxy->ContextInitialized();
return m_proxy->isContextInitialized();
}
bool ScriptController::isEnabled() const
......@@ -331,13 +331,13 @@ static NPObject* createNoScriptObject()
static NPObject* createScriptObject(Frame* frame)
{
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::GetContext(frame);
if (context.IsEmpty())
v8::Handle<v8::Context> v8Context = V8Proxy::context(frame);
if (v8Context.IsEmpty())
return createNoScriptObject();
v8::Context::Scope scope(context);
v8::Context::Scope scope(v8Context);
DOMWindow* window = frame->domWindow();
v8::Handle<v8::Value> global = V8Proxy::ToV8Object(V8ClassIndex::DOMWINDOW, window);
v8::Handle<v8::Value> global = V8Proxy::convertToV8Object(V8ClassIndex::DOMWINDOW, window);
ASSERT(global->IsObject());
return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(global), window);
}
......@@ -368,13 +368,13 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
return createNoScriptObject();
v8::HandleScope handleScope;
v8::Handle<v8::Context> context = V8Proxy::GetContext(m_frame);
if (context.IsEmpty())
v8::Handle<v8::Context> v8Context = V8Proxy::context(m_frame);
if (v8Context.IsEmpty())
return createNoScriptObject();
v8::Context::Scope scope(context);
v8::Context::Scope scope(v8Context);
DOMWindow* window = m_frame->domWindow();
v8::Handle<v8::Value> v8plugin = V8Proxy::ToV8Object(V8ClassIndex::HTMLEMBEDELEMENT, plugin);
v8::Handle<v8::Value> v8plugin = V8Proxy::convertToV8Object(V8ClassIndex::HTMLEMBEDELEMENT, plugin);
if (!v8plugin->IsObject())
return createNoScriptObject();
......
......@@ -62,7 +62,7 @@ void V8ScriptInstance::clear()
if (m_instance.IsEmpty())
return;
#ifndef NDEBUG
V8Proxy::UnregisterGlobalHandle(this, m_instance);
V8Proxy::unregisterGlobalHandle(this, m_instance);
#endif
m_instance.Dispose();
m_instance.Clear();
......@@ -76,7 +76,7 @@ void V8ScriptInstance::set(v8::Handle<v8::Object> instance)
m_instance = v8::Persistent<v8::Object>::New(instance);
#ifndef NDEBUG
V8Proxy::RegisterGlobalHandle(SCRIPTINSTANCE, this, m_instance);
V8Proxy::registerGlobalHandle(SCRIPTINSTANCE, this, m_instance);
#endif
}
......
......@@ -119,7 +119,7 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const S
bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorController* value)
{
ScriptScope scope(scriptState);
scope.global()->Set(v8::String::New(name), V8Proxy::ToV8Object(V8ClassIndex::INSPECTORCONTROLLER, value));
scope.global()->Set(v8::String::New(name), V8Proxy::convertToV8Object(V8ClassIndex::INSPECTORCONTROLLER, value));
return scope.success();
}
......
......@@ -77,10 +77,10 @@ bool getQuarantinedScriptObject(Node* node, ScriptObject& quarantinedObject)
ASSERT(node);
v8::HandleScope handleScope;
v8::Local<v8::Context> context = V8Proxy::GetContext(node->document()->page()->mainFrame());
v8::Local<v8::Context> context = V8Proxy::context(node->document()->page()->mainFrame());
v8::Context::Scope scope(context);
v8::Handle<v8::Value> v8Node = V8Proxy::NodeToV8Object(node);
v8::Handle<v8::Value> v8Node = V8Proxy::convertNodeToV8Object(node);
quarantinedObject = ScriptObject(v8::Local<v8::Object>(v8::Object::Cast(*v8Node)));
return true;
......@@ -91,10 +91,10 @@ bool getQuarantinedScriptObject(DOMWindow* domWindow, ScriptObject& quarantinedO
ASSERT(domWindow);
v8::HandleScope handleScope;
v8::Local<v8::Context> context = V8Proxy::GetContext(domWindow->frame());
v8::Local<v8::Context> context = V8Proxy::context(domWindow->frame());
v8::Context::Scope scope(context);
v8::Handle<v8::Value> v8DomWindow = V8Proxy::ToV8Object(V8ClassIndex::DOMWINDOW, domWindow);
v8::Handle<v8::Value> v8DomWindow = V8Proxy::convertToV8Object(V8ClassIndex::DOMWINDOW, domWindow);
quarantinedObject = ScriptObject(v8::Local<v8::Object>(v8::Object::Cast(*v8DomWindow)));
return true;
......
......@@ -43,7 +43,7 @@
namespace WebCore {
ScriptScope::ScriptScope(ScriptState* scriptState, bool reportExceptions)
: m_context(V8Proxy::GetContext(scriptState->frame()))
: m_context(V8Proxy::context(scriptState->frame()))
, m_scope(m_context)
, m_scriptState(scriptState)
, m_reportExceptions(reportExceptions)
......
......@@ -53,7 +53,7 @@ public:
m_value = v8::Persistent<v8::Value>::New(value);
#ifndef NDEBUG
V8Proxy::RegisterGlobalHandle(SCRIPTVALUE, this, m_value);
V8Proxy::registerGlobalHandle(SCRIPTVALUE, this, m_value);
#endif
}
......@@ -64,7 +64,7 @@ public:
m_value = v8::Persistent<v8::Value>::New(value.m_value);
#ifndef NDEBUG
V8Proxy::RegisterGlobalHandle(SCRIPTVALUE, this, m_value);
V8Proxy::registerGlobalHandle(SCRIPTVALUE, this, m_value);
#endif
}
......@@ -80,7 +80,7 @@ public:
m_value = v8::Persistent<v8::Value>::New(value.m_value);
#ifndef NDEBUG
V8Proxy::RegisterGlobalHandle(SCRIPTVALUE, this, m_value);
V8Proxy::registerGlobalHandle(SCRIPTVALUE, this, m_value);
#endif
return *this;
......@@ -122,7 +122,7 @@ public:
return;
#ifndef NDEBUG
V8Proxy::UnregisterGlobalHandle(this, m_value);
V8Proxy::unregisterGlobalHandle(this, m_value);
#endif
m_value.Dispose();
m_value.Clear();
......