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

Issue 8576001: Chromium does not throw the exception message by calling NPN_SetException from NPAPI plugin

Created:
9 years, 1 month ago by Hongbo
Modified:
7 years, 7 months ago
Reviewers:
Steve Block
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., jam, dpranke-watch+content_chromium.org;
Visibility:
Public.

Description

Fix the issue that chromium does not throw expected Javascript exception when an NPAPI plugin calls NPN_SetException() as described on http://code.google.com/p/chromium/issues/detail?id=68919. This fixing depends on the patch from WebKit bugzilla for https://bugs.webkit.org/show_bug.cgi?id=72484. The root cause is that the exception set by WebBindings::setException in PluginChannelHost::OnSetException will be overwritten by WebCore::npObjectInvokeImpl in case of the return value of excuting invokation on NPObject is false. This patch introduces a new IPC message NPObjectMsg_SetException for NPObjectProxy. If NPN_SetException is called from plugin process, it will handle it to remember an exception has been thrown and tell V8 engine to not throw a general exception again via a returned result parameter. NPObjectProxy::OnSetException is required to be only called in renderer process because it is meaningless to throw an Javascript exception in plugin process. BUG=chromium:68919 TEST=npobject_set_exception.html

Patch Set 1 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -7 lines) Patch
M chrome/test/data/npapi/npobject_set_exception.html View 1 chunk +8 lines, -2 lines 0 comments Download
M content/common/npobject_proxy.h View 3 chunks +11 lines, -0 lines 0 comments Download
M content/common/npobject_proxy.cc View 6 chunks +44 lines, -3 lines 0 comments Download
M content/common/npobject_util.cc View 1 chunk +13 lines, -2 lines 0 comments Download
M content/common/plugin_messages.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Hongbo
9 years, 1 month ago (2011-11-24 05:24:08 UTC) #1
Could you pls review this patch? Thanks

Powered by Google App Engine
This is Rietveld 408576698