[Webkit-unassigned] [Bug 107641] New: always NP plugin exception message show "Error calling method on NPObject."

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 23 00:22:26 PST 2013


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

           Summary: always NP plugin exception message show "Error calling
                    method on NPObject."
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: lafefish at gmail.com


if np plugin throw some error exception message to browser, webkit ignore that and show "Error calling method on NPObject." text only


in c_instance.cpp, we can see code like this

    {
        JSLock::DropAllLocks dropAllLocks(exec);
        ASSERT(globalExceptionString().isNull());
        retval = _object->_class->invoke(_object, ident, cArgs.data(), count, &resultVariant);
        moveGlobalExceptionToExecState(exec);
    }

    if (!retval)
        throwError(exec, createError(exec, "Error calling method on NPObject."));


in case throw exception inside np plugin function, np plugin function call is fail, so 'retval' is false

and in case of that kind of situation, inside moveGlobalExceptionToExecState function, make error exception, but after moveGlobalExceptionToExecState call,  throwError is called, so message made inside np plugin is overwritten 

so I changed moveGlobalExceptionToExecState function, moveGlobalExceptionToExecState have bool type retun value, if  inside moveGlobalExceptionToExecState  throwError is called , this function return true, in that case,  throwError(exec, createError(exec, "Error calling method on NPObject.")) is not called, like this


 {
        JSLock::DropAllLocks dropAllLocks(exec);
        ASSERT(globalExceptionString().isNull());
        retval = _object->_class->invokeDefault(_object, cArgs.data(), count, &resultVariant);
        bexcretval = moveGlobalExceptionToExecState(exec);
    }


      if (!retval && !bexcretval)
      throwError(exec, createError(exec, "Error calling method on NPObject."));

-- 
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