This is one of a series of refactoring commented in https://bugs.webkit.org/show_bug.cgi?id=84074#c5 There are two equivalent throwError()s; i.e. throwError("message", XXXError) and throwError(XXXError, "message"). In this bug we replace throwError("message", XXXError) with throwError(XXXError, "message") (except for the case where XXXError == TypeError. throwError("message", TypeError) will be replaced with throwTypeError("message") in a follow-up patch).
Created attachment 142161 [details] Patch
Created attachment 142164 [details] Patch
Comment on attachment 142164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=142164&action=review > Source/WebCore/bindings/v8/V8NPObject.cpp:95 > - return throwError("NPMethod called on non-NPObject", V8Proxy::ReferenceError); > + return V8Proxy::throwError(V8Proxy::ReferenceError, "NPMethod called on non-NPObject"); Can we move throwError and the type enumeration out of V8Proxy?
(In reply to comment #3) > > Source/WebCore/bindings/v8/V8NPObject.cpp:95 > > - return throwError("NPMethod called on non-NPObject", V8Proxy::ReferenceError); > > + return V8Proxy::throwError(V8Proxy::ReferenceError, "NPMethod called on non-NPObject"); > > Can we move throwError and the type enumeration out of V8Proxy? Yes, my plan is to refactor a series of throwError()s into throwError(XXXError, "message") or throwTypeError("message"), and then move a set of error-related code to V8Binding.h.
Comment on attachment 142164 [details] Patch Clearing flags on attachment: 142164 Committed r117383: <http://trac.webkit.org/changeset/117383>
All reviewed patches have been landed. Closing bug.