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

Unified Diff: webkit/plugins/ppapi/npapi_glue.cc

Issue 7621054: Don't use a scoped_refptr for StringVar::FromPPVar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/plugins/ppapi/message_channel.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/npapi_glue.cc
diff --git a/webkit/plugins/ppapi/npapi_glue.cc b/webkit/plugins/ppapi/npapi_glue.cc
index 7e90a1e2276e9f61fd1ca8e764c95a7dc6fab62b..cdb49d57cfd193ed9e94a03ab646e2b740402a66 100644
--- a/webkit/plugins/ppapi/npapi_glue.cc
+++ b/webkit/plugins/ppapi/npapi_glue.cc
@@ -50,7 +50,7 @@ bool PPVarToNPVariant(PP_Var var, NPVariant* result) {
DOUBLE_TO_NPVARIANT(var.value.as_double, *result);
break;
case PP_VARTYPE_STRING: {
- scoped_refptr<StringVar> string(StringVar::FromPPVar(var));
+ StringVar* string = StringVar::FromPPVar(var);
if (!string) {
VOID_TO_NPVARIANT(*result);
return false;
@@ -106,7 +106,7 @@ PP_Var NPVariantToPPVar(PluginInstance* instance, const NPVariant* variant) {
NPIdentifier PPVarToNPIdentifier(PP_Var var) {
switch (var.type) {
case PP_VARTYPE_STRING: {
- scoped_refptr<StringVar> string(StringVar::FromPPVar(var));
+ StringVar* string = StringVar::FromPPVar(var);
if (!string)
return NULL;
return WebBindings::getStringIdentifier(string->value().c_str());
@@ -216,10 +216,9 @@ void PPResultAndExceptionToNPResult::IgnoreException() {
// Throws the current exception to JS. The exception must be set.
void PPResultAndExceptionToNPResult::ThrowException() {
- scoped_refptr<StringVar> string(StringVar::FromPPVar(exception_));
- if (string) {
+ StringVar* string = StringVar::FromPPVar(exception_);
+ if (string)
WebBindings::setException(object_var_, string->value().c_str());
- }
}
// PPVarArrayFromNPVariantArray ------------------------------------------------
« no previous file with comments | « webkit/plugins/ppapi/message_channel.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698