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

Unified Diff: src/snapshot/code-serializer.cc

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: 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
Index: src/snapshot/code-serializer.cc
diff --git a/src/snapshot/code-serializer.cc b/src/snapshot/code-serializer.cc
index 4229607c75a2173664ea038bedc0c42a6f4777c3..4d5ede79ac86b8ffd79e86e58aa3cfdddda83fbf 100644
--- a/src/snapshot/code-serializer.cc
+++ b/src/snapshot/code-serializer.cc
@@ -4,6 +4,8 @@
#include "src/snapshot/code-serializer.h"
+#include <memory>
+
#include "src/code-stubs.h"
#include "src/log.h"
#include "src/macro-assembler.h"
@@ -154,9 +156,9 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize(
HandleScope scope(isolate);
- base::SmartPointer<SerializedCodeData> scd(
+ std::unique_ptr<SerializedCodeData> scd(
SerializedCodeData::FromCachedData(isolate, cached_data, *source));
- if (scd.is_empty()) {
+ if (!scd) {
if (FLAG_profile_deserialization) PrintF("[Cached code failed check]\n");
DCHECK(cached_data->rejected());
return MaybeHandle<SharedFunctionInfo>();

Powered by Google App Engine
This is Rietveld 408576698