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

Issue 6722021: Be more thorough checking for NULL NPP values (Closed)

Created:
9 years, 9 months ago by davidben
Modified:
9 years, 6 months ago
Reviewers:
ananta
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Be more thorough checking for NULL NPP values Unlike the other entry points, NPN_GetValue and NPN_SetValue don't check for NULL npp values. nspluginwrapper will happily call functions with NULL npp if the instances have been destroyed in the meantime. (And the patch for #53940 will make this happen more often to avoid a plugin-side crash.) NOTE: This does not fix #53940, but the fix for it in nspluginwrapper reveals some missing checks on our end. BUG=53940 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=79498

Patch Set 1 #

Patch Set 2 : Missed one #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -1 line) Patch
M webkit/plugins/npapi/plugin_host.cc View 1 7 chunks +25 lines, -1 line 2 comments Download

Messages

Total messages: 4 (0 generated)
davidben
A little patch to be slightly more robust against silly plugins. It doesn't actually fix ...
9 years, 9 months ago (2011-03-23 18:24:15 UTC) #1
ananta
LGTM http://codereview.chromium.org/6722021/diff/2001/webkit/plugins/npapi/plugin_host.cc File webkit/plugins/npapi/plugin_host.cc (right): http://codereview.chromium.org/6722021/diff/2001/webkit/plugins/npapi/plugin_host.cc#newcode696 webkit/plugins/npapi/plugin_host.cc:696: if (!plugin.get()) { Should we move this code ...
9 years, 9 months ago (2011-03-23 18:39:26 UTC) #2
davidben
http://codereview.chromium.org/6722021/diff/2001/webkit/plugins/npapi/plugin_host.cc File webkit/plugins/npapi/plugin_host.cc (right): http://codereview.chromium.org/6722021/diff/2001/webkit/plugins/npapi/plugin_host.cc#newcode696 webkit/plugins/npapi/plugin_host.cc:696: if (!plugin.get()) { On 2011/03/23 18:39:26, ananta wrote: > ...
9 years, 9 months ago (2011-03-23 18:51:08 UTC) #3
ananta
9 years, 9 months ago (2011-03-23 23:39:18 UTC) #4
On 2011/03/23 18:51:08, David Benjamin wrote:
>
http://codereview.chromium.org/6722021/diff/2001/webkit/plugins/npapi/plugin_...
> File webkit/plugins/npapi/plugin_host.cc (right):
> 
>
http://codereview.chromium.org/6722021/diff/2001/webkit/plugins/npapi/plugin_...
> webkit/plugins/npapi/plugin_host.cc:696: if (!plugin.get()) {
> On 2011/03/23 18:39:26, ananta wrote:
> > Should we move this code outside the switch block to reduce the clutter?
> 
> Some variables don't seem to require a plugin instance. For instance,
> NPNVjavascriptEnabledBool and NPNVSupportsWindowless. I don't know if
> "officially" you're allowed to query them with a null instance, or if plugins
> actually do, but we and Mozilla both accept it, so it's conceivable that
someone
> does.
> 
> (Hence why I'm not very thrilled about doing the check on nspluginwrapper's
end,
> if it does in fact depend on the particular variable.)

ok. LGTM

Powered by Google App Engine
This is Rietveld 408576698