GeezerVison is showing github.com — src: fix node::FatalException · nodejs/node@8930268
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/node.cc +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1484,8 +1484,8 @@ void FatalException(Isolate* isolate, |
1484 | 1484 | Environment* env = Environment::GetCurrent(isolate); |
1485 | 1485 | Local<Object> process_object = env->process_object(); |
1486 | 1486 | Local<String> fatal_exception_string = env->fatal_exception_string(); |
1487 | | - Local<Function> fatal_exception_function = |
1488 | | - process_object->Get(fatal_exception_string).As<Function>(); |
| 1487 | + Local<Value> fatal_exception_function = |
| 1488 | + process_object->Get(fatal_exception_string); |
1489 | 1489 |
|
1490 | 1490 | if (!fatal_exception_function->IsFunction()) { |
1491 | 1491 | // Failed before the process._fatalException function was added! |
@@ -1500,7 +1500,8 @@ void FatalException(Isolate* isolate, |
1500 | 1500 |
|
1501 | 1501 | // This will return true if the JS layer handled it, false otherwise |
1502 | 1502 | Local<Value> caught = |
1503 | | - fatal_exception_function->Call(process_object, 1, &error); |
| 1503 | + fatal_exception_function.As<Function>() |
| 1504 | + ->Call(process_object, 1, &error); |
1504 | 1505 |
|
1505 | 1506 | if (fatal_try_catch.HasTerminated()) |
1506 | 1507 | return; |
|