summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ppapi/proxy/plugin_var_serialization_rules.cc8
-rw-r--r--ppapi/proxy/ppb_font_proxy.cc6
-rw-r--r--ppapi/proxy/ppb_url_util_proxy.cc2
-rw-r--r--ppapi/proxy/ppb_var_deprecated_proxy.cc2
-rw-r--r--ppapi/proxy/ppb_var_proxy.cc2
-rw-r--r--ppapi/proxy/ppp_messaging_proxy_test.cc6
-rw-r--r--ppapi/proxy/resource_creation_proxy.cc2
-rw-r--r--ppapi/shared_impl/url_util_impl.cc10
-rw-r--r--ppapi/shared_impl/var.cc10
-rw-r--r--ppapi/shared_impl/var.h4
-rw-r--r--webkit/plugins/ppapi/message_channel.cc4
-rw-r--r--webkit/plugins/ppapi/npapi_glue.cc9
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_flash_impl_linux.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_font_impl.cc4
-rw-r--r--webkit/plugins/ppapi/ppb_transport_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_uma_private_impl.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_url_request_info_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_url_util_impl.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_var_impl.cc4
-rw-r--r--webkit/plugins/ppapi/resource_creation_impl.cc4
22 files changed, 51 insertions, 52 deletions
diff --git a/ppapi/proxy/plugin_var_serialization_rules.cc b/ppapi/proxy/plugin_var_serialization_rules.cc
index f514773..49e1fc3 100644
--- a/ppapi/proxy/plugin_var_serialization_rules.cc
+++ b/ppapi/proxy/plugin_var_serialization_rules.cc
@@ -28,8 +28,8 @@ PP_Var PluginVarSerializationRules::SendCallerOwned(const PP_Var& var,
// Retrieve the string to use for IPC.
if (var.type == PP_VARTYPE_STRING) {
- scoped_refptr<StringVar> string_var(StringVar::FromPPVar(var));
- if (string_var.get())
+ StringVar* string_var = StringVar::FromPPVar(var);
+ if (string_var)
*str_val = string_var->value();
else
NOTREACHED() << "Trying to send unknown string over IPC.";
@@ -116,8 +116,8 @@ PP_Var PluginVarSerializationRules::BeginSendPassRef(const PP_Var& var,
return var_tracker_->GetHostObject(var);
if (var.type == PP_VARTYPE_STRING) {
- scoped_refptr<StringVar> string_var(StringVar::FromPPVar(var));
- if (string_var.get())
+ StringVar* string_var = StringVar::FromPPVar(var);
+ if (string_var)
*str_val = string_var->value();
else
NOTREACHED() << "Trying to send unknown string over IPC.";
diff --git a/ppapi/proxy/ppb_font_proxy.cc b/ppapi/proxy/ppb_font_proxy.cc
index 987c918..3c42ecd 100644
--- a/ppapi/proxy/ppb_font_proxy.cc
+++ b/ppapi/proxy/ppb_font_proxy.cc
@@ -30,7 +30,7 @@ namespace {
bool PPTextRunToTextRun(const PP_TextRun_Dev* run,
WebKitForwarding::Font::TextRun* output) {
- scoped_refptr<StringVar> str(StringVar::FromPPVar(run->text));
+ StringVar* str = StringVar::FromPPVar(run->text);
if (!str)
return false;
@@ -97,7 +97,7 @@ Font::Font(const HostResource& resource,
: Resource(resource),
webkit_event_(false, false) {
TRACE_EVENT0("ppapi proxy", "Font::Font");
- scoped_refptr<StringVar> face(StringVar::FromPPVar(desc.face));
+ StringVar* face = StringVar::FromPPVar(desc.face);
PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(this);
WebKitForwarding* forwarding = dispatcher->GetWebKitForwarding();
@@ -106,7 +106,7 @@ Font::Font(const HostResource& resource,
base::Bind(&WebKitForwarding::CreateFontForwarding,
base::Unretained(forwarding),
&webkit_event_, desc,
- face.get() ? face->value() : std::string(),
+ face ? face->value() : std::string(),
dispatcher->preferences(),
&font_forwarding_));
}
diff --git a/ppapi/proxy/ppb_url_util_proxy.cc b/ppapi/proxy/ppb_url_util_proxy.cc
index 7490a10..a202038 100644
--- a/ppapi/proxy/ppb_url_util_proxy.cc
+++ b/ppapi/proxy/ppb_url_util_proxy.cc
@@ -36,7 +36,7 @@ PP_Var ConvertComponentsAndReturnURL(PP_Var url,
if (!components)
return url; // Common case - plugin doesn't care about parsing.
- scoped_refptr<StringVar> url_string(StringVar::FromPPVar(url));
+ StringVar* url_string = StringVar::FromPPVar(url);
if (!url_string)
return url;
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc
index ff32df1..396e50e 100644
--- a/ppapi/proxy/ppb_var_deprecated_proxy.cc
+++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc
@@ -70,7 +70,7 @@ PP_Var VarFromUtf8(PP_Module module, const char* data, uint32_t len) {
}
const char* VarToUtf8(PP_Var var, uint32_t* len) {
- scoped_refptr<StringVar> str(StringVar::FromPPVar(var));
+ StringVar* str = StringVar::FromPPVar(var);
if (str) {
*len = static_cast<uint32_t>(str->value().size());
return str->value().c_str();
diff --git a/ppapi/proxy/ppb_var_proxy.cc b/ppapi/proxy/ppb_var_proxy.cc
index 645e554..765deef 100644
--- a/ppapi/proxy/ppb_var_proxy.cc
+++ b/ppapi/proxy/ppb_var_proxy.cc
@@ -30,7 +30,7 @@ PP_Var VarFromUtf8(PP_Module module, const char* data, uint32_t len) {
}
const char* VarToUtf8(PP_Var var, uint32_t* len) {
- scoped_refptr<StringVar> str(StringVar::FromPPVar(var));
+ StringVar* str = StringVar::FromPPVar(var);
if (str) {
*len = static_cast<uint32_t>(str->value().size());
return str->value().c_str();
diff --git a/ppapi/proxy/ppp_messaging_proxy_test.cc b/ppapi/proxy/ppp_messaging_proxy_test.cc
index 839a7ef..25c7e55 100644
--- a/ppapi/proxy/ppp_messaging_proxy_test.cc
+++ b/ppapi/proxy/ppp_messaging_proxy_test.cc
@@ -128,13 +128,13 @@ TEST_F(PPP_Messaging_ProxyTest, SendMessages) {
EXPECT_EQ(expected_instance, received_instance);
EXPECT_EQ(expected_var.type, received_var.type);
- scoped_refptr<StringVar> received_string(StringVar::FromPPVar(received_var));
- ASSERT_TRUE(received_string.get());
+ StringVar* received_string = StringVar::FromPPVar(received_var);
+ ASSERT_TRUE(received_string);
EXPECT_EQ(kTestString, received_string->value());
// Now release the var, and the string should go away (because the ref
// count should be one).
plugin().var_tracker().ReleaseVar(received_var);
- EXPECT_FALSE(StringVar::FromPPVar(received_var).get());
+ EXPECT_FALSE(StringVar::FromPPVar(received_var));
}
} // namespace proxy
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index bc9d0e8..c6d02a7e 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -211,7 +211,7 @@ PP_Resource ResourceCreationProxy::CreateKeyboardInputEvent(
data.event_modifiers = modifiers;
data.key_code = key_code;
if (character_text.type == PP_VARTYPE_STRING) {
- scoped_refptr<StringVar> text_str(StringVar::FromPPVar(character_text));
+ StringVar* text_str = StringVar::FromPPVar(character_text);
if (!text_str)
return 0;
data.character_text = text_str->value();
diff --git a/ppapi/shared_impl/url_util_impl.cc b/ppapi/shared_impl/url_util_impl.cc
index 66a6185..ddad401 100644
--- a/ppapi/shared_impl/url_util_impl.cc
+++ b/ppapi/shared_impl/url_util_impl.cc
@@ -44,7 +44,7 @@ void ConvertComponents(const url_parse::Parsed& input,
PP_Var URLUtilImpl::Canonicalize(PP_Module pp_module,
PP_Var url,
PP_URLComponents_Dev* components) {
- scoped_refptr<StringVar> url_string(StringVar::FromPPVar(url));
+ StringVar* url_string = StringVar::FromPPVar(url);
if (!url_string)
return PP_MakeNull();
return GenerateURLReturn(pp_module, GURL(url_string->value()), components);
@@ -55,8 +55,8 @@ PP_Var URLUtilImpl::ResolveRelativeToURL(PP_Module pp_module,
PP_Var base_url,
PP_Var relative,
PP_URLComponents_Dev* components) {
- scoped_refptr<StringVar> base_url_string(StringVar::FromPPVar(base_url));
- scoped_refptr<StringVar> relative_string(StringVar::FromPPVar(relative));
+ StringVar* base_url_string = StringVar::FromPPVar(base_url);
+ StringVar* relative_string = StringVar::FromPPVar(relative);
if (!base_url_string || !relative_string)
return PP_MakeNull();
@@ -70,8 +70,8 @@ PP_Var URLUtilImpl::ResolveRelativeToURL(PP_Module pp_module,
// static
PP_Bool URLUtilImpl::IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) {
- scoped_refptr<StringVar> url_a_string(StringVar::FromPPVar(url_a));
- scoped_refptr<StringVar> url_b_string(StringVar::FromPPVar(url_b));
+ StringVar* url_a_string = StringVar::FromPPVar(url_a);
+ StringVar* url_b_string = StringVar::FromPPVar(url_b);
if (!url_a_string || !url_b_string)
return PP_FALSE;
diff --git a/ppapi/shared_impl/var.cc b/ppapi/shared_impl/var.cc
index af63b0b..0542e50 100644
--- a/ppapi/shared_impl/var.cc
+++ b/ppapi/shared_impl/var.cc
@@ -37,7 +37,7 @@ std::string Var::PPVarToLogString(PP_Var var) {
case PP_VARTYPE_DOUBLE:
return base::DoubleToString(var.value.as_double);
case PP_VARTYPE_STRING: {
- scoped_refptr<StringVar> string(StringVar::FromPPVar(var));
+ StringVar* string(StringVar::FromPPVar(var));
if (!string)
return "[Invalid string]";
@@ -139,14 +139,14 @@ PP_Var StringVar::StringToPPVar(PP_Module module,
}
// static
-scoped_refptr<StringVar> StringVar::FromPPVar(PP_Var var) {
+StringVar* StringVar::FromPPVar(PP_Var var) {
if (var.type != PP_VARTYPE_STRING)
- return scoped_refptr<StringVar>();
+ return NULL;
scoped_refptr<Var> var_object(
TrackerBase::Get()->GetVarTracker()->GetVar(var));
if (!var_object)
- return scoped_refptr<StringVar>();
- return scoped_refptr<StringVar>(var_object->AsStringVar());
+ return NULL;
+ return var_object->AsStringVar();
}
} // namespace ppapi
diff --git a/ppapi/shared_impl/var.h b/ppapi/shared_impl/var.h
index 1ff42dd..02553bb 100644
--- a/ppapi/shared_impl/var.h
+++ b/ppapi/shared_impl/var.h
@@ -84,7 +84,7 @@ class Var : public base::RefCounted<Var> {
// return StringVar::StringToPPVar(module, my_string);
//
// Converting a PP_Var to a string:
-// scoped_refptr<StringVar> string(StringVar::FromPPVar(var));
+// StringVar* string = StringVar::FromPPVar(var);
// if (!string)
// return false; // Not a string or an invalid var.
// DoSomethingWithTheString(string->value());
@@ -112,7 +112,7 @@ class StringVar : public Var {
// Helper function that converts a PP_Var to a string. This will return NULL
// if the PP_Var is not of string type or the string is invalid.
- static scoped_refptr<StringVar> FromPPVar(PP_Var var);
+ static StringVar* FromPPVar(PP_Var var);
private:
std::string value_;
diff --git a/webkit/plugins/ppapi/message_channel.cc b/webkit/plugins/ppapi/message_channel.cc
index 71368a6..33eacfa 100644
--- a/webkit/plugins/ppapi/message_channel.cc
+++ b/webkit/plugins/ppapi/message_channel.cc
@@ -69,7 +69,7 @@ bool PPVarToNPVariantNoCopy(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;
@@ -102,7 +102,7 @@ PP_Var CopyPPVar(const PP_Var& var) {
NOTIMPLEMENTED();
return PP_MakeUndefined();
} else if (var.type == PP_VARTYPE_STRING) {
- scoped_refptr<StringVar> string(StringVar::FromPPVar(var));
+ StringVar* string = StringVar::FromPPVar(var);
if (!string)
return PP_MakeUndefined();
return StringVar::StringToPPVar(string->pp_module(), string->value());
diff --git a/webkit/plugins/ppapi/npapi_glue.cc b/webkit/plugins/ppapi/npapi_glue.cc
index 7e90a1e..cdb49d5 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 ------------------------------------------------
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 3270297..52b1eac 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -604,7 +604,7 @@ string16 PluginInstance::GetSelectedText(bool html) {
PP_Var rv = plugin_selection_interface_->GetSelectedText(pp_instance(),
PP_FromBool(html));
- scoped_refptr<StringVar> string(StringVar::FromPPVar(rv));
+ StringVar* string = StringVar::FromPPVar(rv);
// Release the ref the plugin transfered to us.
ResourceTracker::Get()->GetVarTracker()->ReleaseVar(rv);
if (!string)
@@ -622,7 +622,7 @@ string16 PluginInstance::GetLinkAtPosition(const gfx::Point& point) {
p.x = point.x();
p.y = point.y();
PP_Var rv = plugin_pdf_interface_->GetLinkAtPosition(pp_instance(), p);
- scoped_refptr<StringVar> string(StringVar::FromPPVar(rv));
+ StringVar* string = StringVar::FromPPVar(rv);
// Release the ref the plugin transfered to us.
ResourceTracker::Get()->GetVarTracker()->ReleaseVar(rv);
if (!string)
@@ -1438,7 +1438,7 @@ PP_Var PluginInstance::ExecuteScript(PP_Instance instance,
return PP_MakeUndefined();
// Convert the script into an inconvenient NPString object.
- scoped_refptr<StringVar> script_string(StringVar::FromPPVar(script));
+ StringVar* script_string = StringVar::FromPPVar(script);
if (!script_string) {
try_catch.SetException("Script param to ExecuteScript must be a string.");
return PP_MakeUndefined();
diff --git a/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc b/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc
index b35391a..4d4647c 100644
--- a/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc
@@ -99,7 +99,7 @@ PP_Var ReadPlainText(PP_Instance instance_id,
int32_t WritePlainText(PP_Instance instance_id,
PP_Flash_Clipboard_Type clipboard_type,
PP_Var text) {
- scoped_refptr<StringVar> text_string(StringVar::FromPPVar(text));
+ StringVar* text_string = StringVar::FromPPVar(text);
if (!text_string)
return PP_ERROR_BADARGUMENT;
diff --git a/webkit/plugins/ppapi/ppb_flash_impl_linux.cc b/webkit/plugins/ppapi/ppb_flash_impl_linux.cc
index 36739a4..a4f4d4a 100644
--- a/webkit/plugins/ppapi/ppb_flash_impl_linux.cc
+++ b/webkit/plugins/ppapi/ppb_flash_impl_linux.cc
@@ -46,7 +46,7 @@ PP_Bool PPB_Flash_Impl::DrawGlyphs(PP_Instance,
return PP_FALSE;
// Set up the typeface.
- scoped_refptr<StringVar> face_name(StringVar::FromPPVar(font_desc->face));
+ StringVar* face_name = StringVar::FromPPVar(font_desc->face);
if (!face_name)
return PP_FALSE;
int style = SkTypeface::kNormal;
diff --git a/webkit/plugins/ppapi/ppb_font_impl.cc b/webkit/plugins/ppapi/ppb_font_impl.cc
index fbbddea..8db4ed6 100644
--- a/webkit/plugins/ppapi/ppb_font_impl.cc
+++ b/webkit/plugins/ppapi/ppb_font_impl.cc
@@ -30,7 +30,7 @@ namespace {
// False means the input was invalid.
bool PPTextRunToTextRun(const PP_TextRun_Dev* run,
WebKitForwarding::Font::TextRun* output) {
- scoped_refptr<StringVar> text_string(StringVar::FromPPVar(run->text));
+ StringVar* text_string = StringVar::FromPPVar(run->text);
if (!text_string)
return false;
@@ -45,7 +45,7 @@ bool PPTextRunToTextRun(const PP_TextRun_Dev* run,
PPB_Font_Impl::PPB_Font_Impl(PluginInstance* instance,
const PP_FontDescription_Dev& desc)
: Resource(instance) {
- scoped_refptr<StringVar> face_name(StringVar::FromPPVar(desc.face));
+ StringVar* face_name = StringVar::FromPPVar(desc.face);
WebKitForwarding::Font* result = NULL;
instance->module()->GetWebKitForwarding()->CreateFontForwarding(
diff --git a/webkit/plugins/ppapi/ppb_transport_impl.cc b/webkit/plugins/ppapi/ppb_transport_impl.cc
index 55a46e8..3048c60 100644
--- a/webkit/plugins/ppapi/ppb_transport_impl.cc
+++ b/webkit/plugins/ppapi/ppb_transport_impl.cc
@@ -142,7 +142,7 @@ int32_t PPB_Transport_Impl::ReceiveRemoteAddress(PP_Var address) {
if (!p2p_transport_.get())
return PP_ERROR_FAILED;
- scoped_refptr<StringVar> address_str = StringVar::FromPPVar(address);
+ StringVar* address_str = StringVar::FromPPVar(address);
if (!address_str)
return PP_ERROR_BADARGUMENT;
diff --git a/webkit/plugins/ppapi/ppb_uma_private_impl.cc b/webkit/plugins/ppapi/ppb_uma_private_impl.cc
index 10807cb..ec85c16 100644
--- a/webkit/plugins/ppapi/ppb_uma_private_impl.cc
+++ b/webkit/plugins/ppapi/ppb_uma_private_impl.cc
@@ -33,7 +33,7 @@ void HistogramCustomTimes(PP_Var name,
uint32_t bucket_count) {
RETURN_IF_BAD_ARGS(name, sample, min, max, bucket_count);
- scoped_refptr<StringVar> name_string(StringVar::FromPPVar(name));
+ StringVar* name_string = StringVar::FromPPVar(name);
if (name_string == NULL)
return;
base::Histogram* counter =
@@ -52,7 +52,7 @@ void HistogramCustomCounts(PP_Var name,
uint32_t bucket_count) {
RETURN_IF_BAD_ARGS(name, sample, min, max, bucket_count);
- scoped_refptr<StringVar> name_string(StringVar::FromPPVar(name));
+ StringVar* name_string = StringVar::FromPPVar(name);
if (name_string == NULL)
return;
base::Histogram* counter =
@@ -70,7 +70,7 @@ void HistogramEnumeration(PP_Var name,
int32_t boundary_value) {
RETURN_IF_BAD_ARGS(name, sample, 1, boundary_value, boundary_value + 1);
- scoped_refptr<StringVar> name_string(StringVar::FromPPVar(name));
+ StringVar* name_string = StringVar::FromPPVar(name);
if (name_string == NULL)
return;
base::Histogram* counter =
diff --git a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
index 8820a41..1b72319 100644
--- a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc
@@ -220,7 +220,7 @@ PP_Bool PPB_URLRequestInfo_Impl::SetProperty(PP_URLRequestProperty property,
SetIntegerProperty(property, var.value.as_int));
break;
case PP_VARTYPE_STRING: {
- scoped_refptr<StringVar> string(StringVar::FromPPVar(var));
+ StringVar* string = StringVar::FromPPVar(var);
if (string)
result = PP_FromBool(SetStringProperty(property, string->value()));
break;
diff --git a/webkit/plugins/ppapi/ppb_url_util_impl.cc b/webkit/plugins/ppapi/ppb_url_util_impl.cc
index 1900731..429cbe6 100644
--- a/webkit/plugins/ppapi/ppb_url_util_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_util_impl.cc
@@ -33,7 +33,7 @@ namespace {
// Returns the PP_Module associated with the given string, or 0 on failure.
PP_Module GetModuleFromVar(PP_Var string_var) {
- scoped_refptr<StringVar> str(StringVar::FromPPVar(string_var));
+ StringVar* str = StringVar::FromPPVar(string_var);
if (!str)
return 0;
return str->pp_module();
@@ -72,7 +72,7 @@ PP_Var ResolveRelativeToDocument(PP_Instance instance_id,
if (!instance)
return PP_MakeNull();
- scoped_refptr<StringVar> relative_string(StringVar::FromPPVar(relative));
+ StringVar* relative_string = StringVar::FromPPVar(relative);
if (!relative_string)
return PP_MakeNull();
@@ -89,7 +89,7 @@ PP_Bool IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) {
}
PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) {
- scoped_refptr<StringVar> url_string(StringVar::FromPPVar(url));
+ StringVar* url_string = StringVar::FromPPVar(url);
if (!url_string)
return PP_FALSE;
diff --git a/webkit/plugins/ppapi/ppb_var_impl.cc b/webkit/plugins/ppapi/ppb_var_impl.cc
index 160b972..384d449 100644
--- a/webkit/plugins/ppapi/ppb_var_impl.cc
+++ b/webkit/plugins/ppapi/ppb_var_impl.cc
@@ -68,7 +68,7 @@ bool PPVarToNPVariantNoCopy(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;
@@ -182,7 +182,7 @@ PP_Var VarFromUtf8(PP_Module module, const char* data, uint32_t len) {
}
const char* VarToUtf8(PP_Var var, uint32_t* len) {
- scoped_refptr<StringVar> str(StringVar::FromPPVar(var));
+ StringVar* str = StringVar::FromPPVar(var);
if (!str) {
*len = 0;
return NULL;
diff --git a/webkit/plugins/ppapi/resource_creation_impl.cc b/webkit/plugins/ppapi/resource_creation_impl.cc
index 0aafe50..6ecde57 100644
--- a/webkit/plugins/ppapi/resource_creation_impl.cc
+++ b/webkit/plugins/ppapi/resource_creation_impl.cc
@@ -197,8 +197,8 @@ PP_Resource ResourceCreationImpl::CreateKeyboardInputEvent(
data.event_modifiers = modifiers;
data.key_code = key_code;
if (character_text.type == PP_VARTYPE_STRING) {
- scoped_refptr<StringVar> string_var(StringVar::FromPPVar(character_text));
- if (!string_var.get())
+ StringVar* string_var = StringVar::FromPPVar(character_text);
+ if (!string_var)
return 0;
data.character_text = string_var->value();
}