[Webkit-unassigned] [Bug 72484] New: [v8] Exception thrown in npObjectInvokeImpl may overwrite the exception message thrown by NPN_SetException

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 16 02:40:00 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=72484

           Summary: [v8] Exception thrown in npObjectInvokeImpl may
                    overwrite the exception message thrown by
                    NPN_SetException
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Minor
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hongbo.min at intel.com
                CC: hongbo.min at intel.com


The npObjectInvokeImpl function defined in V8NPObject.cpp file will cause the renderer process can't throw the expected exception message by calling NPN_SetException in NPAPI plugin.

In the process of invoking an native method exposed by NPAPI plugin via NPClass::construct or NPClass::invoke, the method itself can thrown an exception message to JS engine by calling NPN_SetException and return false in case of an error occurs during method execution.

However, in npObjectInvokeImpl implementation, it will throw exception once the NPClass::constuct or NPClass::invoke returns false. As a result, the pending exception in JS context thrown by NPN_SetException will be discarded and replaced by a general exception with "Error calling method on NPObject." message.

The issue is also raised in chromium community http://code.google.com/p/chromium/issues/detail?id=68919.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list