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

Unified Diff: chrome/plugin/npobject_proxy.cc

Issue 155628: Fixes a crash in the plugin process caused by the XStandard plugin passing in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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: chrome/plugin/npobject_proxy.cc
===================================================================
--- chrome/plugin/npobject_proxy.cc (revision 20840)
+++ chrome/plugin/npobject_proxy.cc (working copy)
@@ -110,6 +110,9 @@
bool NPObjectProxy::NPHasMethod(NPObject *obj,
NPIdentifier name) {
+ if (obj == NULL)
+ return false;
+
bool result = false;
NPObjectProxy* proxy = GetProxy(obj);
@@ -147,6 +150,9 @@
const NPVariant *args,
uint32_t arg_count,
NPVariant *np_result) {
+ if (obj == NULL)
+ return false;
+
NPObjectProxy* proxy = GetProxy(obj);
if (!proxy) {
return obj->_class->invoke(obj, name, args, arg_count, np_result);
@@ -205,6 +211,9 @@
bool NPObjectProxy::NPHasProperty(NPObject *obj,
NPIdentifier name) {
+ if (obj == NULL)
+ return false;
+
bool result = false;
NPObjectProxy* proxy = GetProxy(obj);
if (!proxy) {
@@ -267,6 +276,9 @@
bool NPObjectProxy::NPSetProperty(NPObject *obj,
NPIdentifier name,
const NPVariant *value) {
+ if (obj == NULL)
+ return false;
+
bool result = false;
NPObjectProxy* proxy = GetProxy(obj);
if (!proxy) {
@@ -291,6 +303,9 @@
bool NPObjectProxy::NPRemoveProperty(NPObject *obj,
NPIdentifier name) {
+ if (obj == NULL)
+ return false;
+
bool result = false;
NPObjectProxy* proxy = GetProxy(obj);
if (!proxy) {
@@ -310,6 +325,9 @@
}
void NPObjectProxy::NPPInvalidate(NPObject *obj) {
+ if (obj == NULL)
+ return;
+
NPObjectProxy* proxy = GetProxy(obj);
if (!proxy) {
obj->_class->invalidate(obj);
@@ -324,6 +342,9 @@
bool NPObjectProxy::NPNEnumerate(NPObject *obj,
NPIdentifier **value,
uint32_t *count) {
+ if (obj == NULL)
+ return false;
+
bool result = false;
NPObjectProxy* proxy = GetProxy(obj);
if (!proxy) {
@@ -352,6 +373,9 @@
const NPVariant *args,
uint32_t arg_count,
NPVariant *np_result) {
+ if (obj == NULL)
+ return false;
+
NPObjectProxy* proxy = GetProxy(obj);
if (!proxy) {
return obj->_class->construct(obj, args, arg_count, np_result);
« 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