| Index: webkit/port/bindings/v8/V8NPObject.cpp
|
| ===================================================================
|
| --- webkit/port/bindings/v8/V8NPObject.cpp (revision 19426)
|
| +++ webkit/port/bindings/v8/V8NPObject.cpp (working copy)
|
| @@ -63,25 +63,25 @@
|
| if (V8HTMLAppletElement::HasInstance(args.Holder()) || V8HTMLEmbedElement::HasInstance(args.Holder())
|
| || V8HTMLObjectElement::HasInstance(args.Holder())) {
|
| // The holder object is a subtype of HTMLPlugInElement.
|
| - HTMLPlugInElement* element = V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(args.Holder());
|
| + HTMLPlugInElement* element = V8Proxy::convertDOMWrapperToNode<HTMLPlugInElement>(args.Holder());
|
| ScriptInstance scriptInstance = element->getInstance();
|
| if (scriptInstance)
|
| - npObject = V8Proxy::ToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, scriptInstance->instance());
|
| + npObject = V8Proxy::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, scriptInstance->instance());
|
| else
|
| npObject = 0;
|
| } else {
|
| // The holder object is not a subtype of HTMLPlugInElement, it
|
| // must be an NPObject which has three internal fields.
|
| if (args.Holder()->InternalFieldCount() != V8Custom::kNPObjectInternalFieldCount)
|
| - return throwError("NPMethod called on non-NPObject", V8Proxy::REFERENCE_ERROR);
|
| + return throwError("NPMethod called on non-NPObject", V8Proxy::ReferenceError);
|
|
|
| - npObject = V8Proxy::ToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, args.Holder());
|
| + npObject = V8Proxy::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, args.Holder());
|
| }
|
|
|
| // Verify that our wrapper wasn't using a NPObject which
|
| // has already been deleted.
|
| if (!npObject || !_NPN_IsAlive(npObject))
|
| - return throwError("NPObject deleted", V8Proxy::REFERENCE_ERROR);
|
| + return throwError("NPObject deleted", V8Proxy::ReferenceError);
|
|
|
| // Wrap up parameters.
|
| int numArgs = args.Length();
|
| @@ -158,12 +158,12 @@
|
| NPIdentifier identifier,
|
| v8::Local<v8::Value> key)
|
| {
|
| - NPObject* npObject = V8Proxy::ToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, self);
|
| + NPObject* npObject = V8Proxy::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, self);
|
|
|
| // Verify that our wrapper wasn't using a NPObject which
|
| // has already been deleted.
|
| if (!npObject || !_NPN_IsAlive(npObject))
|
| - return throwError("NPObject deleted", V8Proxy::REFERENCE_ERROR);
|
| + return throwError("NPObject deleted", V8Proxy::ReferenceError);
|
|
|
|
|
| if (npObject->_class->hasProperty && npObject->_class->hasProperty(npObject, identifier)
|
| @@ -231,12 +231,12 @@
|
| NPIdentifier identifier,
|
| v8::Local<v8::Value> value)
|
| {
|
| - NPObject* npObject = V8Proxy::ToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, self);
|
| + NPObject* npObject = V8Proxy::convertToNativeObject<NPObject>(V8ClassIndex::NPOBJECT, self);
|
|
|
| // Verify that our wrapper wasn't using a NPObject which
|
| // has already been deleted.
|
| if (!npObject || !_NPN_IsAlive(npObject)) {
|
| - throwError("NPObject deleted", V8Proxy::REFERENCE_ERROR);
|
| + throwError("NPObject deleted", V8Proxy::ReferenceError);
|
| return value; // Intercepted, but an exception was thrown.
|
| }
|
|
|
| @@ -339,7 +339,7 @@
|
| }
|
|
|
| v8::Handle<v8::Function> v8Function = npObjectDesc->GetFunction();
|
| - v8::Local<v8::Object> value = SafeAllocation::NewInstance(v8Function);
|
| + v8::Local<v8::Object> value = SafeAllocation::newInstance(v8Function);
|
|
|
| // If we were unable to allocate the instance, we avoid wrapping
|
| // and registering the NP object.
|
| @@ -365,7 +365,7 @@
|
| if (staticNPObjectMap.contains(object)) {
|
| v8::HandleScope scope;
|
| v8::Persistent<v8::Object> handle(staticNPObjectMap.get(object));
|
| - WebCore::V8Proxy::SetDOMWrapper(handle, WebCore::V8ClassIndex::NPOBJECT, 0);
|
| + WebCore::V8Proxy::setDOMWrapper(handle, WebCore::V8ClassIndex::NPOBJECT, 0);
|
| staticNPObjectMap.forget(object);
|
| NPN_ReleaseObject(object);
|
| }
|
|
|