| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 29866ca commit f332c4c
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,6 +66,7 @@ using v8::Int32; | |||
| 66 | 66 | using v8::Integer; | |
| 67 | 67 | using v8::Isolate; | |
| 68 | 68 | using v8::Just; | |
| 69 | + using v8::JustVoid; | ||
| 69 | 70 | using v8::Local; | |
| 70 | 71 | using v8::Maybe; | |
| 71 | 72 | using v8::Nothing; | |
@@ -1450,7 +1451,7 @@ void AfterGetAddrInfo(uv_getaddrinfo_t* req, int status, struct addrinfo* res) { | |||
| 1450 | 1451 | if (status == 0) { | |
| 1451 | 1452 | Local<Array> results = Array::New(env->isolate()); | |
| 1452 | 1453 | ||
| 1453 | - auto add = [&] (bool want_ipv4, bool want_ipv6) -> Maybe<bool> { | ||
| 1454 | + auto add = [&](bool want_ipv4, bool want_ipv6) -> Maybe<void> { | ||
| 1454 | 1455 | for (auto p = res; p != nullptr; p = p->ai_next) { | |
| 1455 | 1456 | CHECK_EQ(p->ai_socktype, SOCK_STREAM); | |
| 1456 | 1457 | ||
@@ -1471,10 +1472,10 @@ void AfterGetAddrInfo(uv_getaddrinfo_t* req, int status, struct addrinfo* res) { | |||
| 1471 | 1472 | ||
| 1472 | 1473 | Local<String> s = OneByteString(env->isolate(), ip); | |
| 1473 | 1474 | if (results->Set(env->context(), n, s).IsNothing()) | |
| 1474 | - return Nothing<bool>(); | ||
| 1475 | + return Nothing<void>(); | ||
| 1475 | 1476 | n++; | |
| 1476 | 1477 | } | |
| 1477 | - return Just(true); | ||
| 1478 | + return JustVoid(); | ||
| 1478 | 1479 | }; | |
| 1479 | 1480 | ||
| 1480 | 1481 | switch (order) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,7 +55,7 @@ using v8::Int32; | |||
| 55 | 55 | using v8::Integer; | |
| 56 | 56 | using v8::Intercepted; | |
| 57 | 57 | using v8::Isolate; | |
| 58 | - using v8::Just; | ||
| 58 | + using v8::JustVoid; | ||
| 59 | 59 | using v8::KeyCollectionMode; | |
| 60 | 60 | using v8::Local; | |
| 61 | 61 | using v8::Maybe; | |
@@ -1104,7 +1104,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) { | |||
| 1104 | 1104 | TRACE_EVENT_END0(TRACING_CATEGORY_NODE2(vm, script), "ContextifyScript::New"); | |
| 1105 | 1105 | } | |
| 1106 | 1106 | ||
| 1107 | - Maybe<bool> StoreCodeCacheResult( | ||
| 1107 | + Maybe<void> StoreCodeCacheResult( | ||
| 1108 | 1108 | Environment* env, | |
| 1109 | 1109 | Local<Object> target, | |
| 1110 | 1110 | ScriptCompiler::CompileOptions compile_options, | |
@@ -1113,7 +1113,7 @@ Maybe<bool> StoreCodeCacheResult( | |||
| 1113 | 1113 | std::unique_ptr<ScriptCompiler::CachedData> new_cached_data) { | |
| 1114 | 1114 | Local<Context> context; | |
| 1115 | 1115 | if (!target->GetCreationContext().ToLocal(&context)) { | |
| 1116 | - return Nothing<bool>(); | ||
| 1116 | + return Nothing<void>(); | ||
| 1117 | 1117 | } | |
| 1118 | 1118 | if (compile_options == ScriptCompiler::kConsumeCodeCache) { | |
| 1119 | 1119 | if (target | |
@@ -1122,7 +1122,7 @@ Maybe<bool> StoreCodeCacheResult( | |||
| 1122 | 1122 | env->cached_data_rejected_string(), | |
| 1123 | 1123 | Boolean::New(env->isolate(), source.GetCachedData()->rejected)) | |
| 1124 | 1124 | .IsNothing()) { | |
| 1125 | - return Nothing<bool>(); | ||
| 1125 | + return Nothing<void>(); | ||
| 1126 | 1126 | } | |
| 1127 | 1127 | } | |
| 1128 | 1128 | if (produce_cached_data) { | |
@@ -1134,18 +1134,18 @@ Maybe<bool> StoreCodeCacheResult( | |||
| 1134 | 1134 | new_cached_data->length); | |
| 1135 | 1135 | if (target->Set(context, env->cached_data_string(), buf.ToLocalChecked()) | |
| 1136 | 1136 | .IsNothing()) { | |
| 1137 | - return Nothing<bool>(); | ||
| 1137 | + return Nothing<void>(); | ||
| 1138 | 1138 | } | |
| 1139 | 1139 | } | |
| 1140 | 1140 | if (target | |
| 1141 | 1141 | ->Set(context, | |
| 1142 | 1142 | env->cached_data_produced_string(), | |
| 1143 | 1143 | Boolean::New(env->isolate(), cached_data_produced)) | |
| 1144 | 1144 | .IsNothing()) { | |
| 1145 | - return Nothing<bool>(); | ||
| 1145 | + return Nothing<void>(); | ||
| 1146 | 1146 | } | |
| 1147 | 1147 | } | |
| 1148 | - return Just(true); | ||
| 1148 | + return JustVoid(); | ||
| 1149 | 1149 | } | |
| 1150 | 1150 | ||
| 1151 | 1151 | // TODO(RaisinTen): Reuse in ContextifyContext::CompileFunction(). | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -177,7 +177,7 @@ class ContextifyScript : public BaseObject { | |||
| 177 | 177 | v8::Global<v8::UnboundScript> script_; | |
| 178 | 178 | }; | |
| 179 | 179 | ||
| 180 | - v8::Maybe<bool> StoreCodeCacheResult( | ||
| 180 | + v8::Maybe<void> StoreCodeCacheResult( | ||
| 181 | 181 | Environment* env, | |
| 182 | 182 | v8::Local<v8::Object> target, | |
| 183 | 183 | v8::ScriptCompiler::CompileOptions compile_options, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,19 +37,19 @@ class StringBytes { | |||
| 37 | 37 | public: | |
| 38 | 38 | class InlineDecoder : public MaybeStackBuffer<char> { | |
| 39 | 39 | public: | |
| 40 | - inline v8::Maybe<bool> Decode(Environment* env, | ||
| 40 | + inline v8::Maybe<void> Decode(Environment* env, | ||
| 41 | 41 | v8::Local<v8::String> string, | |
| 42 | 42 | enum encoding enc) { | |
| 43 | 43 | size_t storage; | |
| 44 | 44 | if (!StringBytes::StorageSize(env->isolate(), string, enc).To(&storage)) | |
| 45 | - return v8::Nothing<bool>(); | ||
| 45 | + return v8::Nothing<void>(); | ||
| 46 | 46 | AllocateSufficientStorage(storage); | |
| 47 | 47 | const size_t length = | |
| 48 | 48 | StringBytes::Write(env->isolate(), out(), storage, string, enc); | |
| 49 | 49 | ||
| 50 | 50 | // No zero terminator is included when using this method. | |
| 51 | 51 | SetLength(length); | |
| 52 | - return v8::Just(true); | ||
| 52 | + return v8::JustVoid(); | ||
| 53 | 53 | } | |
| 54 | 54 | ||
| 55 | 55 | inline size_t size() const { return length(); } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments