GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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
Filter options
  • src
    • node.cc
    • node_errors.cc
    • util.cc
    • util.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ unsigned int reverted_cve = 0;
147147

148148
// util.h
149149
// 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().
151151
bool v8_initialized = false;
152152

153153
// node_internals.h
Collapse file

‎src/node_errors.cc‎

Copy file name to clipboardExpand all lines: src/node_errors.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ void OnFatalError(const char* location, const char* message) {
434434
FPrintF(stderr, "FATAL ERROR: %s\n", message);
435435
}
436436

437-
Isolate* isolate = Isolate::GetCurrent();
437+
Isolate* isolate = Isolate::TryGetCurrent();
438438
Environment* env = nullptr;
439439
if (isolate != nullptr) {
440440
env = Environment::GetCurrent(isolate);
Collapse file

‎src/util.cc‎

Copy file name to clipboardExpand all lines: src/util.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ BufferValue::BufferValue(Isolate* isolate, Local<Value> value) {
128128

129129
void LowMemoryNotification() {
130130
if (per_process::v8_initialized) {
131-
auto isolate = Isolate::GetCurrent();
131+
auto isolate = Isolate::TryGetCurrent();
132132
if (isolate != nullptr) {
133133
isolate->LowMemoryNotification();
134134
}
Collapse file

‎src/util.h‎

Copy file name to clipboardExpand all lines: src/util.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ inline T MultiplyWithOverflowCheck(T a, T b);
9191

9292
namespace per_process {
9393
// 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().
9595
extern bool v8_initialized;
9696
} // namespace per_process
9797

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.