GeezerVison is showing github.com — src: use Isolate::TryGetCurrent where appropriate · jaku/node@200ed07
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 +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -147,7 +147,7 @@ unsigned int reverted_cve = 0; |
147 | 147 |
|
148 | 148 | // util.h |
149 | 149 | // Tells whether the per-process V8::Initialize() is called and |
150 | | -// if it is safe to call v8::Isolate::GetCurrent(). |
| 150 | +// if it is safe to call v8::Isolate::TryGetCurrent(). |
151 | 151 | bool v8_initialized = false; |
152 | 152 |
|
153 | 153 | // node_internals.h |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_errors.cc +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -434,7 +434,7 @@ void OnFatalError(const char* location, const char* message) { |
434 | 434 | FPrintF(stderr, "FATAL ERROR: %s\n", message); |
435 | 435 | } |
436 | 436 |
|
437 | | - Isolate* isolate = Isolate::GetCurrent(); |
| 437 | + Isolate* isolate = Isolate::TryGetCurrent(); |
438 | 438 | Environment* env = nullptr; |
439 | 439 | if (isolate != nullptr) { |
440 | 440 | env = Environment::GetCurrent(isolate); |
|
Collapse file
Copy file name to clipboardExpand all lines: src/util.cc +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -128,7 +128,7 @@ BufferValue::BufferValue(Isolate* isolate, Local<Value> value) { |
128 | 128 |
|
129 | 129 | void LowMemoryNotification() { |
130 | 130 | if (per_process::v8_initialized) { |
131 | | - auto isolate = Isolate::GetCurrent(); |
| 131 | + auto isolate = Isolate::TryGetCurrent(); |
132 | 132 | if (isolate != nullptr) { |
133 | 133 | isolate->LowMemoryNotification(); |
134 | 134 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: src/util.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -91,7 +91,7 @@ inline T MultiplyWithOverflowCheck(T a, T b); |
91 | 91 |
|
92 | 92 | namespace per_process { |
93 | 93 | // Tells whether the per-process V8::Initialize() is called and |
94 | | -// if it is safe to call v8::Isolate::GetCurrent(). |
| 94 | +// if it is safe to call v8::Isolate::TryGetCurrent(). |
95 | 95 | extern bool v8_initialized; |
96 | 96 | } // namespace per_process |
97 | 97 |
|
|