Fix compilation errors
This commit is contained in:
parent
c82d21b39f
commit
01e891652f
7 changed files with 34 additions and 40 deletions
|
@ -39,8 +39,7 @@ void SetDestructor(v8::Isolate* isolate,
|
|||
}
|
||||
|
||||
void TakeHeapSnapshot(v8::Isolate* isolate) {
|
||||
isolate->GetHeapProfiler()->TakeHeapSnapshot(
|
||||
mate::StringToV8(isolate, "test"));
|
||||
isolate->GetHeapProfiler()->TakeHeapSnapshot();
|
||||
}
|
||||
|
||||
void Initialize(v8::Handle<v8::Object> exports, v8::Handle<v8::Value> unused,
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
#include "base/files/file.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/pickle.h"
|
||||
#include "base/json/json_string_value_serializer.h"
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/values.h"
|
||||
|
||||
namespace asar {
|
||||
|
||||
|
@ -149,15 +150,15 @@ bool Archive::Init() {
|
|||
}
|
||||
|
||||
std::string error;
|
||||
JSONStringValueSerializer serializer(&header);
|
||||
base::Value* value = serializer.Deserialize(NULL, &error);
|
||||
base::JSONReader reader;
|
||||
scoped_ptr<base::Value> value(reader.ReadToValue(header));
|
||||
if (!value || !value->IsType(base::Value::TYPE_DICTIONARY)) {
|
||||
LOG(ERROR) << "Failed to parse header: " << error;
|
||||
return false;
|
||||
}
|
||||
|
||||
header_size_ = 8 + size;
|
||||
header_.reset(static_cast<base::DictionaryValue*>(value));
|
||||
header_.reset(static_cast<base::DictionaryValue*>(value.release()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue