Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Unified Diff: webkit/port/bindings/v8/V8NPObject.cpp

Issue 149086: Use upstream V8Proxy and V8Utilities (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/port/bindings/v8/NPV8Object.cpp ('k') | webkit/port/bindings/v8/V8NPUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « webkit/port/bindings/v8/NPV8Object.cpp ('k') | webkit/port/bindings/v8/V8NPUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698