-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash if exception thrown from onload/onerror
If a user-provided .onload or .onerror handler on an Image throws an exception, the Node.js process crashes: FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal. 1: 0x94d778 node::Abort() [node] 2: 0x94edb1 node::OnFatalError(char const*, char const*) [node] 3: 0xad5b0d v8::Utils::ReportApiFailure(char const*, char const*) [node] 4: 0x7f98f47799ae Image::SetSource(Nan::FunctionCallbackInfo<v8::Value> const&) [/home/strager/tmp/Projects/node-canvas/build/Release/canvas.node] 5: 0x7f98f4774fec [/home/strager/tmp/Projects/node-canvas/build/Release/canvas.node] 6: 0xb395b9 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [node] 7: 0xb39970 [node] 8: 0xb3a1ea [node] 9: 0xb3aa99 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node] 10: 0x12e89b9 [node] Fix this issue by not requiring a return value from the .onload and .onerror functions.
- Loading branch information
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters