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

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

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 5 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
« no previous file with comments | « src/wasm/decoder.h ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index 326c2e26ab541515db785537f4173f0ad1b6ef21..ffa24a41b826872a6630708ad945dfd787c53a9f 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -44,7 +44,7 @@ class ModuleDecoder : public Decoder {
pc_ = limit_; // On error, terminate section decoding loop.
}
- static void DumpModule(WasmModule* module, ModuleResult result) {
+ static void DumpModule(WasmModule* module, const ModuleResult& result) {
std::string path;
if (FLAG_dump_wasm_module_path) {
path = FLAG_dump_wasm_module_path;
@@ -458,7 +458,7 @@ class ModuleDecoder : public Decoder {
if (ok()) VerifyFunctionBody(0, module_env, function);
FunctionResult result;
- result.CopyFrom(result_); // Copy error code and location.
+ result.MoveFrom(result_); // Copy error code and location.
result.val = function;
return result;
}
@@ -562,8 +562,8 @@ class ModuleDecoder : public Decoder {
buffer[len - 1] = 0;
// Copy error code and location.
- result_.CopyFrom(result);
- result_.error_msg.Reset(buffer);
+ result_.MoveFrom(result);
+ result_.error_msg.reset(buffer);
}
}
@@ -690,7 +690,7 @@ class ModuleError : public ModuleResult {
char* result = new char[len];
strncpy(result, msg, len);
result[len - 1] = 0;
- error_msg.Reset(result);
+ error_msg.reset(result);
}
};
@@ -703,7 +703,7 @@ class FunctionError : public FunctionResult {
char* result = new char[len];
strncpy(result, msg, len);
result[len - 1] = 0;
- error_msg.Reset(result);
+ error_msg.reset(result);
}
};
« no previous file with comments | « src/wasm/decoder.h ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698