1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00

upgrade: V8 8.0.192

This commit is contained in:
Ryan Dahl 2019-11-07 10:45:58 -05:00 committed by Ry Dahl
parent e1d1836854
commit 508d728b5e
7 changed files with 25 additions and 22 deletions

View file

@ -75,25 +75,21 @@ Deno* deno_new(deno_config config) {
return reinterpret_cast<Deno*>(d);
}
deno::DenoIsolate* unwrap(Deno* d_) {
return reinterpret_cast<deno::DenoIsolate*>(d_);
}
void deno_lock(Deno* d_) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
CHECK_NULL(d->locker_);
d->locker_ = new v8::Locker(d->isolate_);
}
void deno_unlock(Deno* d_) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
CHECK_NOT_NULL(d->locker_);
delete d->locker_;
d->locker_ = nullptr;
}
deno_snapshot deno_snapshot_new(Deno* d_) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
CHECK_NOT_NULL(d->snapshot_creator_);
d->ClearModules();
d->context_.Reset();
@ -134,7 +130,7 @@ void deno_set_v8_flags(int* argc, char** argv) {
}
const char* deno_last_exception(Deno* d_) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
if (d->last_exception_.length() > 0) {
return d->last_exception_.c_str();
} else {
@ -144,7 +140,7 @@ const char* deno_last_exception(Deno* d_) {
void deno_execute(Deno* d_, void* user_data, const char* js_filename,
const char* js_source) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
deno::UserDataScope user_data_scope(d, user_data);
auto* isolate = d->isolate_;
v8::Locker locker(isolate);
@ -161,13 +157,13 @@ void deno_pinned_buf_delete(deno_pinned_buf* buf) {
}
void deno_throw_exception(Deno* d_, const char* text) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
auto* isolate = d->isolate_;
isolate->ThrowException(deno::v8_str(text));
}
void deno_respond(Deno* d_, void* user_data, deno_op_id op_id, deno_buf buf) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
if (d->current_args_ != nullptr) {
// Synchronous response.
// Note op_id is not passed back in the case of synchronous response.
@ -213,7 +209,7 @@ void deno_respond(Deno* d_, void* user_data, deno_op_id op_id, deno_buf buf) {
}
void deno_check_promise_errors(Deno* d_) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
if (d->pending_promise_map_.size() > 0) {
auto* isolate = d->isolate_;
v8::Locker locker(isolate);

@ -1 +1 @@
Subproject commit 6af664c48ed657b89e99a9a8692dc15d7f7a6d9c
Subproject commit b3fe5cb48e9399765ec103ca0c14057f77cf9fc3

View file

@ -1,6 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
#include "exceptions.h"
#include <string>
#include "internal.h"
namespace deno {

View file

@ -148,6 +148,12 @@ static inline v8::Local<v8::String> v8_str(const char* x) {
.ToLocalChecked();
}
static inline DenoIsolate* unwrap(Deno* d_) {
return reinterpret_cast<deno::DenoIsolate*>(d_);
}
const char* ToCString(const v8::String::Utf8Value& value);
void Print(const v8::FunctionCallbackInfo<v8::Value>& args);
void Recv(const v8::FunctionCallbackInfo<v8::Value>& args);
void Send(const v8::FunctionCallbackInfo<v8::Value>& args);

View file

@ -67,24 +67,24 @@ extern "C" {
deno_mod deno_mod_new(Deno* d_, bool main, const char* name_cstr,
const char* source_cstr) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
return d->RegisterModule(main, name_cstr, source_cstr);
}
const char* deno_mod_name(Deno* d_, deno_mod id) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
auto* info = d->GetModuleInfo(id);
return info->name.c_str();
}
size_t deno_mod_imports_len(Deno* d_, deno_mod id) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
auto* info = d->GetModuleInfo(id);
return info->import_specifiers.size();
}
const char* deno_mod_imports_get(Deno* d_, deno_mod id, size_t index) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
auto* info = d->GetModuleInfo(id);
if (info == nullptr || index >= info->import_specifiers.size()) {
return nullptr;
@ -95,7 +95,7 @@ const char* deno_mod_imports_get(Deno* d_, deno_mod id, size_t index) {
void deno_mod_instantiate(Deno* d_, void* user_data, deno_mod id,
deno_resolve_cb cb) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
deno::UserDataScope user_data_scope(d, user_data);
auto* isolate = d->isolate_;
@ -130,7 +130,7 @@ void deno_mod_instantiate(Deno* d_, void* user_data, deno_mod id,
}
void deno_mod_evaluate(Deno* d_, void* user_data, deno_mod id) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
deno::UserDataScope user_data_scope(d, user_data);
auto* isolate = d->isolate_;
@ -170,7 +170,7 @@ void deno_mod_evaluate(Deno* d_, void* user_data, deno_mod id) {
void deno_dyn_import_done(Deno* d_, void* user_data,
deno_dyn_import_id import_id, deno_mod mod_id,
const char* error_str) {
auto* d = unwrap(d_);
auto* d = deno::unwrap(d_);
CHECK((mod_id == 0 && error_str != nullptr) ||
(mod_id != 0 && error_str == nullptr) ||
(mod_id == 0 && !d->last_exception_handle_.IsEmpty()));

@ -1 +1 @@
Subproject commit 3be244fe9064e57cb106d6a270662a27e76a7223
Subproject commit 989bc2a0309782d3ce5c23d945a952ee610e15af

View file

@ -2,7 +2,7 @@
# pylint: disable=line-too-long
solutions = [
{
'url': 'https://chromium.googlesource.com/v8/v8.git@7.9.317.12',
'url': 'https://chromium.googlesource.com/v8/v8.git@8.0.192',
'name': 'v8',
'deps_file': 'DEPS',
'custom_deps': {