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

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: minor doc fix 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 0f7df4d6064e0d542367da780486db8a6002f65e..6a158ec73c893e1dcb95e04509e54630386b7eab 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -338,7 +338,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);
@@ -374,7 +374,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