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

Cameron Zwarich (cpst)
Reported 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.
Attachments
Cleanup patch (13.67 KB, patch)
2008-07-03 19:08 PDT, Cameron Zwarich (cpst)
eric: review-
Revised cleanup patch (13.31 KB, patch)
2008-07-04 14:04 PDT, Cameron Zwarich (cpst)
no flags
Geoffrey Garen
Comment 1 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.
Cameron Zwarich (cpst)
Comment 2 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.
Eric Seidel (no email)
Comment 3 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).
Cameron Zwarich (cpst)
Comment 4 2008-07-04 14:04:28 PDT
Created attachment 22089 [details] Revised cleanup patch
Eric Seidel (no email)
Comment 5 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.
Cameron Zwarich (cpst)
Comment 6 2008-07-04 15:44:01 PDT
Comment on attachment 22089 [details] Revised cleanup patch Cleanup patch landed in r35004.
David Kilzer (:ddkilzer)
Comment 7 2008-07-20 15:26:58 PDT
Related to Bug 16829?
Cameron Zwarich (cpst)
Comment 8 2009-02-05 07:06:35 PST
*** This bug has been marked as a duplicate of 16829 ***
Note You need to log in before you can comment on or make changes to this bug.