diff options
author | kasperl@google.com <kasperl@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-23 13:00:34 +0000 |
---|---|---|
committer | kasperl@google.com <kasperl@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-23 13:00:34 +0000 |
commit | d72f2e5759215eb28c9092e3fe4a09a838f82b49 (patch) | |
tree | f5a5f67ee58bdf43e886a814f65b3fd05f1b7f20 /webkit/port | |
parent | 8f2a3626345ac9c0d686d85e12aa5918bd5ad842 (diff) | |
download | chromium_src-d72f2e5759215eb28c9092e3fe4a09a838f82b49.zip chromium_src-d72f2e5759215eb28c9092e3fe4a09a838f82b49.tar.gz chromium_src-d72f2e5759215eb28c9092e3fe4a09a838f82b49.tar.bz2 |
Update V8 in Chromium and fix compilation errors
resulting from API changes.
NOTE: I'll probably submit this with a slightly later
V8; I'm still waiting for the try-finally issue to
be resolved.
Review URL: http://codereview.chromium.org/7913
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/bindings/v8/v8_events.cpp | 2 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_npobject.cpp | 8 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 27 |
3 files changed, 19 insertions, 18 deletions
diff --git a/webkit/port/bindings/v8/v8_events.cpp b/webkit/port/bindings/v8/v8_events.cpp index b088f15..dd11bb2 100644 --- a/webkit/port/bindings/v8/v8_events.cpp +++ b/webkit/port/bindings/v8/v8_events.cpp @@ -237,7 +237,7 @@ v8::Local<v8::Object> V8EventListener::GetThisObject(Event* event, // ------- V 8 X H R E v e n t L i s t e n e r ----------------- -static void WeakXHRListenerCallback(v8::Persistent<v8::Object> obj, +static void WeakXHRListenerCallback(v8::Persistent<v8::Value> obj, void* para) { V8XHREventListener* listener = static_cast<V8XHREventListener*>(para); diff --git a/webkit/port/bindings/v8/v8_npobject.cpp b/webkit/port/bindings/v8/v8_npobject.cpp index 035117d..48335ac 100644 --- a/webkit/port/bindings/v8/v8_npobject.cpp +++ b/webkit/port/bindings/v8/v8_npobject.cpp @@ -131,13 +131,13 @@ v8::Handle<v8::Value> NPObjectInvokeDefaultHandler(const v8::Arguments& args) { } -static void WeakTemplateCallback(v8::Persistent<v8::Object> obj, void* param); +static void WeakTemplateCallback(v8::Persistent<v8::Value> obj, void* param); // NPIdentifier is PrivateIdentifier*. static WeakReferenceMap<PrivateIdentifier, v8::FunctionTemplate> \ static_template_map(&WeakTemplateCallback); -static void WeakTemplateCallback(v8::Persistent<v8::Object> obj, +static void WeakTemplateCallback(v8::Persistent<v8::Value> obj, void* param) { PrivateIdentifier* iden = static_cast<PrivateIdentifier*>(param); ASSERT(iden != NULL); @@ -277,11 +277,11 @@ v8::Handle<v8::Value> NPObjectSetIndexedProperty(v8::Local<v8::Object> self, } -static void WeakNPObjectCallback(v8::Persistent<v8::Object> obj, void* param); +static void WeakNPObjectCallback(v8::Persistent<v8::Value> obj, void* param); static DOMWrapperMap<NPObject> static_npobject_map(&WeakNPObjectCallback); -static void WeakNPObjectCallback(v8::Persistent<v8::Object> obj, +static void WeakNPObjectCallback(v8::Persistent<v8::Value> obj, void* param) { NPObject* npobject = static_cast<NPObject*>(param); ASSERT(static_npobject_map.contains(npobject)); diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index fe67a22..920f494 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -281,8 +281,8 @@ class DOMPeerableWrapperMap : public DOMWrapperMap<T> { }; -static void WeakPeerableCallback(v8::Persistent<v8::Object> obj, void* para); -static void WeakNodeCallback(v8::Persistent<v8::Object> obj, void* para); +static void WeakPeerableCallback(v8::Persistent<v8::Value> obj, void* para); +static void WeakNodeCallback(v8::Persistent<v8::Value> obj, void* para); // A map from DOM node to its JS wrapper. static DOMWrapperMap<Node>& dom_node_map() { @@ -300,7 +300,7 @@ static DOMWrapperMap<Peerable>& dom_object_map() } #if ENABLE(SVG) -static void WeakSVGElementInstanceCallback(v8::Persistent<v8::Object> obj, +static void WeakSVGElementInstanceCallback(v8::Persistent<v8::Value> obj, void* param); // A map for SVGElementInstances, which are not peerable @@ -311,7 +311,7 @@ static DOMWrapperMap<SVGElementInstance>& dom_svg_element_instance_map() return static_dom_svg_element_instance_map; } -static void WeakSVGElementInstanceCallback(v8::Persistent<v8::Object> obj, +static void WeakSVGElementInstanceCallback(v8::Persistent<v8::Value> obj, void* param) { SVGElementInstance* instance = static_cast<SVGElementInstance*>(param); @@ -348,7 +348,7 @@ v8::Handle<v8::Value> V8Proxy::SVGElementInstanceToV8Object( // SVG non-node elements may have a reference to a context node which // should be notified when the element is change -static void WeakSVGObjectWithContext(v8::Persistent<v8::Object> obj, +static void WeakSVGObjectWithContext(v8::Persistent<v8::Value> obj, void* param); // Map of SVG objects with contexts to V8 objects @@ -389,7 +389,7 @@ v8::Handle<v8::Value> V8Proxy::SVGObjectWithContextToV8Object( return result; } -static void WeakSVGObjectWithContext(v8::Persistent<v8::Object> obj, +static void WeakSVGObjectWithContext(v8::Persistent<v8::Value> obj, void* param) { Peerable* dom_obj = static_cast<Peerable*>(param); @@ -433,7 +433,7 @@ SVGElement* V8Proxy::GetSVGContext(void* obj) // Called when obj is near death (not reachable from JS roots) // It is time to remove the entry from the table and dispose // the handle. -static void WeakPeerableCallback(v8::Persistent<v8::Object> obj, void* para) +static void WeakPeerableCallback(v8::Persistent<v8::Value> obj, void* para) { Peerable* dom_obj = static_cast<Peerable*>(para); ASSERT(dom_object_map().contains(dom_obj)); @@ -443,7 +443,7 @@ static void WeakPeerableCallback(v8::Persistent<v8::Object> obj, void* para) dom_object_map().forget(dom_obj); } -static void WeakNodeCallback(v8::Persistent<v8::Object> obj, void* param) +static void WeakNodeCallback(v8::Persistent<v8::Value> obj, void* param) { Node* node = static_cast<Node*>(param); ASSERT(dom_node_map().contains(node)); @@ -716,12 +716,13 @@ static void HandleConsoleMessage(v8::Handle<v8::Message> message, ASSERT(!errorMessageString.IsEmpty()); String errorMessage = ToWebCoreString(errorMessageString); - v8::Handle<v8::String> resourceNameString = message->GetScriptResourceName(); - String resourceName = (resourceNameString.IsEmpty()) - ? frame->document()->url() - : ToWebCoreString(resourceNameString); + v8::Handle<v8::Value> resourceName = message->GetScriptResourceName(); + bool useURL = (resourceName.IsEmpty() || !resourceName->IsString()); + String resourceNameString = (useURL) + ? frame->document()->url() + : ToWebCoreString(resourceName); JavaScriptConsoleMessage consoleMessage(errorMessage, - resourceName, + resourceNameString, message->GetLineNumber()); ConsoleMessageManager::AddMessage(page, consoleMessage); } |