Bug 19888

Summary: Implement _NPN_SetException() correctly
Product: WebKit Reporter: Cameron Zwarich (cpst) <zwarich>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Cleanup patch
eric: review-
Revised cleanup patch none

Description Cameron Zwarich (cpst) 2008-07-03 11:03:01 PDT
We had to remove our broken implementation of _NPN_SetException() to fix bug 19853, but we should implement it correctly. Of course, it is not entirely certain what "correctly" means in this case, so we will need to test compatibility with other browsers.
Comment 1 Geoffrey Garen 2008-07-03 11:53:08 PDT
I think we could do something along the lines of the +[WebScriptObject setException:] API, which allows you to set an exception in the current execution context iff you're in a JavaScript callback to a plug-in interface.
Comment 2 Cameron Zwarich (cpst) 2008-07-03 19:08:22 PDT
Created attachment 22078 [details]
Cleanup patch

Here's some some simple cleanup to make it easier to work on this code in the future.
Comment 3 Eric Seidel (no email) 2008-07-04 12:21:40 PDT
Comment on attachment 22078 [details]
Cleanup patch

cpst and I discussed this over IRC.  There is a behavior change bug in this patch.  He's going to go for one more round of cleanup (and remove the added bug).
Comment 4 Cameron Zwarich (cpst) 2008-07-04 14:04:28 PDT
Created attachment 22089 [details]
Revised cleanup patch
Comment 5 Eric Seidel (no email) 2008-07-04 15:19:49 PDT
Comment on attachment 22089 [details]
Revised cleanup patch

Looks fine.

Took me a minute to figure out what
_NPN_GetStringIdentifier
and
_NPN_GetStringIdentifiers were doing.  I'm not sure the old argument names were very helpful, but the names of those functions certainly aren't.
Comment 6 Cameron Zwarich (cpst) 2008-07-04 15:44:01 PDT
Comment on attachment 22089 [details]
Revised cleanup patch

Cleanup patch landed in r35004.
Comment 7 David Kilzer (:ddkilzer) 2008-07-20 15:26:58 PDT
Related to Bug 16829?

Comment 8 Cameron Zwarich (cpst) 2009-02-05 07:06:35 PST

*** This bug has been marked as a duplicate of 16829 ***