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

Unified Diff: Source/WebKit/chromium/src/WebBindings.cpp

Issue 24715003: [oilpan] Fix NPObject bindings by not using HandleScopes in WebBindings for non-webcore specific me… (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Address review comment. Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebBindings.cpp
diff --git a/Source/WebKit/chromium/src/WebBindings.cpp b/Source/WebKit/chromium/src/WebBindings.cpp
index 537e2533bcfa470bcfd1552d20f8ad63c36d3fab..d03f0a794bf60b7f67624f3c41e6290cbc88f2c2 100644
--- a/Source/WebKit/chromium/src/WebBindings.cpp
+++ b/Source/WebKit/chromium/src/WebBindings.cpp
@@ -63,7 +63,8 @@ bool WebBindings::construct(NPP npp, NPObject* object, const NPVariant* args, ui
NPObject* WebBindings::createObject(NPP npp, NPClass* npClass)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_CreateObject(npp, npClass);
}
@@ -87,7 +88,8 @@ bool WebBindings::evaluateHelper(NPP npp, bool popupsAllowed, NPObject* object,
NPIdentifier WebBindings::getIntIdentifier(int32_t number)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_GetIntIdentifier(number);
}
@@ -99,13 +101,15 @@ bool WebBindings::getProperty(NPP npp, NPObject* object, NPIdentifier property,
NPIdentifier WebBindings::getStringIdentifier(const NPUTF8* string)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_GetStringIdentifier(string);
}
void WebBindings::getStringIdentifiers(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
_NPN_GetStringIdentifiers(names, nameCount, identifiers);
}
@@ -123,19 +127,22 @@ bool WebBindings::hasProperty(NPP npp, NPObject* object, NPIdentifier property)
bool WebBindings::identifierIsString(NPIdentifier identifier)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_IdentifierIsString(identifier);
}
int32_t WebBindings::intFromIdentifier(NPIdentifier identifier)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_IntFromIdentifier(identifier);
}
void WebBindings::initializeVariantWithStringCopy(NPVariant* variant, const NPString* value)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
_NPN_InitializeVariantWithStringCopy(variant, value);
}
@@ -153,13 +160,15 @@ bool WebBindings::invokeDefault(NPP npp, NPObject* object, const NPVariant* args
void WebBindings::releaseObject(NPObject* object)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_ReleaseObject(object);
}
void WebBindings::releaseVariantValue(NPVariant* variant)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
_NPN_ReleaseVariantValue(variant);
}
@@ -171,7 +180,8 @@ bool WebBindings::removeProperty(NPP npp, NPObject* object, NPIdentifier identif
NPObject* WebBindings::retainObject(NPObject* object)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_RetainObject(object);
}
@@ -189,19 +199,22 @@ bool WebBindings::setProperty(NPP npp, NPObject* object, NPIdentifier identifier
void WebBindings::unregisterObject(NPObject* object)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
_NPN_UnregisterObject(object);
}
NPUTF8* WebBindings::utf8FromIdentifier(NPIdentifier identifier)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
return _NPN_UTF8FromIdentifier(identifier);
}
void WebBindings::extractIdentifierData(const NPIdentifier& identifier, const NPUTF8*& string, int32_t& number, bool& isString)
{
- HandleScope scope;
+ // WebCore independent method that is called from non-WebCore related
+ // threads. Therefore there is no HandleScope nor NoHandleScope here.
PrivateIdentifier* data = static_cast<PrivateIdentifier*>(identifier);
if (!data) {
isString = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698