Better exception handling in NPAPI

RESOLVED WONTFIX

Status

()

Core
Plug-ins
RESOLVED WONTFIX
7 years ago
10 months ago

People

(Reporter: lekma, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.10 (maverick) Firefox/3.6.18
Build ID: 20110628231248




Expected results:

Following up on bug 670629, it would be useful if plugins could "catch" exceptions happening during execution of npruntime calls.
(Reporter)

Comment 1

7 years ago
Proposal:
NPP_Report(const char *message, uint32_t flags)
This, if implemented by the plugin author, would be called in case an error or a warning has been reported during execution of the npruntime calls.
This could be implemented by setting a JSErrorReporter in AutoJSExceptionReporter constructor and resetting it in the destructor.
(This could also pass along more info from the JSErrorReporter like filename, lineno, ...)

Any feedback/suggestions/other proposals are welcome.
(Reporter)

Comment 2

7 years ago
(In reply to comment #1)
> This could be implemented by setting a JSErrorReporter in
> AutoJSExceptionReporter constructor and resetting it in the destructor.
Or, in fact, only in the destructor (thinking out loud).
(Reporter)

Comment 3

7 years ago
What about NPN_SetException? Could  we use that to, say, throw a StopIteration (that'd be great!)?
(Reporter)

Comment 4

7 years ago
(In reply to comment #1)
> (This could also pass along more info from the JSErrorReporter like
> filename, lineno, ...)
I meant: from the JSErrorReport
Component: General → Plug-ins
OS: Other → All
QA Contact: general → plugins

Comment 5

10 months ago
Flash is the only NPAPI now, and is considered legacy, so we're not going to implement further improvements.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.