Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1286)

Unified Diff: src/wasm/wasm-module.cc

Issue 1970503004: [wasm] Differentiate unnamed and empty names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@add-utf8-check
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index e7c0a02f9ea1061a3c9e683a91510adc4174dabe..1b5bb27cdf1e5e0c2b31fa6f9eec6235f68a1d41 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -340,7 +340,7 @@ static MaybeHandle<JSFunction> ReportFFIError(ErrorThrower& thrower,
const char* error, uint32_t index,
wasm::WasmName module_name,
wasm::WasmName function_name) {
- if (function_name.start()) {
+ if (!function_name.is_empty()) {
thrower.Error("Import #%d module=\"%.*s\" function=\"%.*s\" error: %s",
index, module_name.length(), module_name.start(),
function_name.length(), function_name.start(), error);
@@ -376,7 +376,7 @@ static MaybeHandle<JSFunction> LookupFunction(
}
Handle<Object> function;
- if (function_name.start()) {
+ if (!function_name.is_empty()) {
// Look up the function in the module.
Handle<String> name = factory->InternalizeUtf8String(function_name);
MaybeHandle<Object> result = Object::GetProperty(module, name);

Powered by Google App Engine
This is Rietveld 408576698