|  | 
| 3 | 3 | 
 | 
| 4 | 4 | #include "env-inl.h" | 
| 5 | 5 | #include "node_binding.h" | 
|  | 6 | +#include "node_errors.h" | 
| 6 | 7 | #include "node_external_reference.h" | 
| 7 | 8 | #include "node_internals.h" | 
| 8 | 9 | #include "node_sea.h" | 
| @@ -1362,8 +1363,8 @@ void GetCLIOptionsValues(const FunctionCallbackInfo<Value>& args) { | 
| 1362 | 1363 | 
 | 
| 1363 | 1364 |   if (!env->has_run_bootstrapping_code()) { | 
| 1364 | 1365 |     // No code because this is an assertion. | 
| 1365 |  | -    return env->ThrowError( | 
| 1366 |  | -        "Should not query options before bootstrapping is done"); | 
|  | 1366 | +    THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | 
|  | 1367 | +        isolate, "Should not query options before bootstrapping is done"); | 
| 1367 | 1368 |   } | 
| 1368 | 1369 |   env->set_has_serialized_options(true); | 
| 1369 | 1370 | 
 | 
| @@ -1480,8 +1481,8 @@ void GetCLIOptionsInfo(const FunctionCallbackInfo<Value>& args) { | 
| 1480 | 1481 | 
 | 
| 1481 | 1482 |   if (!env->has_run_bootstrapping_code()) { | 
| 1482 | 1483 |     // No code because this is an assertion. | 
| 1483 |  | -    return env->ThrowError( | 
| 1484 |  | -        "Should not query options before bootstrapping is done"); | 
|  | 1484 | +    THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | 
|  | 1485 | +        isolate, "Should not query options before bootstrapping is done"); | 
| 1485 | 1486 |   } | 
| 1486 | 1487 | 
 | 
| 1487 | 1488 |   Mutex::ScopedLock lock(per_process::cli_options_mutex); | 
| @@ -1547,7 +1548,8 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) { | 
| 1547 | 1548 |   Environment* env = Environment::GetCurrent(args); | 
| 1548 | 1549 |   if (!env->has_run_bootstrapping_code()) { | 
| 1549 | 1550 |     // No code because this is an assertion. | 
| 1550 |  | -    return env->ThrowError( | 
|  | 1551 | +    THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | 
|  | 1552 | +        env->isolate(), | 
| 1551 | 1553 |         "Should not query options before bootstrapping is done"); | 
| 1552 | 1554 |   } | 
| 1553 | 1555 |   Isolate* isolate = args.GetIsolate(); | 
| @@ -1583,8 +1585,8 @@ void GetEnvOptionsInputType(const FunctionCallbackInfo<Value>& args) { | 
| 1583 | 1585 | 
 | 
| 1584 | 1586 |   if (!env->has_run_bootstrapping_code()) { | 
| 1585 | 1587 |     // No code because this is an assertion. | 
| 1586 |  | -    return env->ThrowError( | 
| 1587 |  | -        "Should not query options before bootstrapping is done"); | 
|  | 1588 | +    THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING( | 
|  | 1589 | +        isolate, "Should not query options before bootstrapping is done"); | 
| 1588 | 1590 |   } | 
| 1589 | 1591 | 
 | 
| 1590 | 1592 |   Mutex::ScopedLock lock(per_process::cli_options_mutex); | 
|  | 
0 commit comments