Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v10.15.3 proposal #26063

Merged
merged 209 commits into from
Mar 5, 2019
Merged
Changes from 1 commit
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
f9fc1ea
src: use v8:: for consistency in util
ZYSzys Dec 13, 2018
fa12b24
deps: V8: backport 442977e
ofrobots Dec 27, 2018
67239ab
deps: cherry-pick d9fbfeb from upstream V8
alexkozy Sep 14, 2018
0d1500d
vm: add dynamic import support
devsnek Aug 17, 2018
46f5c32
src: re-sort the symbol macros
sam-github Nov 15, 2018
0a36fb2
test: cover tls multi-identity option mixtures
sam-github Nov 28, 2016
24d7071
test: add independent multi-alg crypto identities
sam-github Dec 20, 2016
3e31344
test: rename agent1-pfx.pem to agent1.pfx
sam-github Dec 22, 2016
9293b49
test: confirm tls server suite default is its own
sam-github Nov 28, 2016
30d04fc
n-api: handle reference delete before finalize
mhdawson Nov 16, 2018
b9204db
http: fix error check in `Execute()`
mscdex Feb 1, 2019
f9df38c
deps: V8: cherry-pick d0468de
Jan 30, 2019
21a9b1f
deps: V8: cherry-pick 3cc6919
Feb 1, 2019
a459450
src: elevate v8 namespaces of node_trace_events.cc
Jayasankar-m Nov 19, 2018
32d8622
doc: mark napi_add_finalizer experimental
mhdawson Nov 22, 2018
93ab4d2
test: replace callback with arrow functions
prodroy1 Nov 23, 2018
12ee805
doc: replace anonymous function with arrow function
yuriettys Nov 24, 2018
5babfcb
doc: use arrow function
sadnessOjisan Nov 24, 2018
5b0daaf
doc: replace anonymous function with arrow function
ka2jun8 Nov 24, 2018
50d0a99
doc: fix duplicate "this" and "the" on http2.md
kawanet Nov 24, 2018
5a85c98
test: fix the arguments order in `assert.strictEqual`
sota1235 Nov 24, 2018
98c0fac
test: fix http2-binding strictEqual order
dominikeinkemmer Nov 24, 2018
10f360c
http2: fix session[kSession] undefined issue
leeight Nov 21, 2018
3b0cc28
test: fix arguments order in assert.strictEqual
teppeis Nov 24, 2018
ef12744
src: elevate v8 namespaces for node_url.cc
Jayasankar-m Nov 23, 2018
b219131
test: fix assert.strictEqual
sakit0 Nov 24, 2018
f371321
test: cover path.basename when path and ext are the same
Nov 22, 2018
964f822
test: split out http2 from test-stream-pipeline
Trott Nov 24, 2018
748de6b
build: replace `-not` with `!` in `find`
Trott Nov 25, 2018
5d34cea
test: change anonymous function to arrow function
codegagan Nov 20, 2018
c779ca0
test: convert callback to arrow function
jamesgeorge007 Nov 23, 2018
de5d2c0
lib: fix nits in lib/internal/bootstrap/cache.js
vsemozhetbyt Nov 23, 2018
2a1e768
lib: simplify own keys retrieval
vsemozhetbyt Nov 23, 2018
5493261
tools: use print() function on both Python 2 and 3
Nov 19, 2018
96187c3
doc: revise handling-own-pull-requests text
Trott Nov 23, 2018
4c85197
doc: use arrow function for anonymous callbacks
Nov 24, 2018
6277a50
lib: change anonymous function to arrow function
taishikato Nov 24, 2018
e861bea
crypto: convert to arrow function
ota-meshi Nov 24, 2018
9e4a376
test: fix arguments order in `assert.strictEqual`
tottokotkd Nov 24, 2018
eccd8f6
lib: convert to arrow function
HisadaNaojiro Nov 24, 2018
64b1fa7
doc: clarify symlink resolution for __filename
Trott Nov 24, 2018
94e3560
lib: suppress crypto related env vars in help msg
danbev Nov 21, 2018
dfd3c58
src: simplify uptime and ppid return values
cjihrig Nov 22, 2018
7f60754
test: replace anonymous closure functions with arrow functions
tpanthera Nov 17, 2018
4dd89b3
tools,doc: fix version picker bug in html.js
Trott Nov 25, 2018
6799d3b
test: add test for socket.end callback
Ajido Nov 4, 2018
be7f1a8
doc: revise accepting-modifications in guide
Trott Nov 26, 2018
967363d
test: use arrow functions in callbacks
apoorvanand Nov 17, 2018
73cfbb0
test: fix argument order in assert.strictEqual
Nov 24, 2018
64c5f03
stream: use arrow function for callback
DoiChris Nov 24, 2018
23b289a
test: update strictEqual argument order
VeysonD Nov 24, 2018
664eed6
process: emit unhandled warning immediately
apapirovski Nov 24, 2018
b2dfddc
n-api,test: remove last argument in assert.strictEqual()
susantruong Nov 23, 2018
c58f6a9
test: fix arguments order in `assert.strictEqual`
na9amura Nov 24, 2018
db2358e
lib: convert to Arrow Function
Nov 24, 2018
5770c52
test: use arrow function
sagirk Nov 19, 2018
24701de
doc: add antsmartian to collaborators
antsmartian Nov 26, 2018
1b96d81
test: make test-uv-binding-constant JS engine neutral
Trott Nov 27, 2018
d902d7a
lib: convert to arrow function
horihiro Nov 24, 2018
b31faff
test: fix arguments order in assert.strictEqual
grimrose Nov 24, 2018
e7b8067
test: fix arguments order in `assert.strictEqual`
sota1235 Nov 24, 2018
54d847d
lib: rearm pre-existing signal event registrations
gireeshpunathil Nov 26, 2018
9a093c0
test: test and docs for detached fork process
nanomosfet Nov 20, 2018
6a80380
test: validate fs.rename() when NODE_TEST_DIR on separate mount
drewfish Nov 28, 2018
33304ab
lib: chenged anonymous function to arrow function
kojiGit55 Nov 24, 2018
403a99f
lib: change callbacks to arrow function
Naturalclar Nov 24, 2018
a06d19f
test: reach res._dump after abort ClientRequest
tadhgcreedon Nov 6, 2018
c01f040
lib: convert to arrow function in fs.js
Nov 24, 2018
1d94f3e
test: fix the arguments order in `assert.strictEqual`
rt33 Nov 24, 2018
9231b5f
test: fix the arguments order in assert.strictEqual
Nov 24, 2018
be1eea2
win, build: skip building cctest by default
bzoz Jun 19, 2018
6fe278d
build, tools, win: add .S files support to GYP
bzoz Nov 21, 2018
28aca77
test: mark test-vm-timeout-escape-nexttick flaky
gireeshpunathil Nov 29, 2018
eecb2a4
test: fix the arguments order in assert.strictEqual
pastak Nov 24, 2018
8e8035e
http2: add compat support for nested array headers
sebdeckers Nov 27, 2018
1cff573
stream: make async iterator .next() always resolve
mcollina Nov 27, 2018
cdaa2bb
test: use arrow syntax for anonymous callbacks
Shubhamurkade Nov 27, 2018
f6b3cf0
lib: move setupAllowedFlags() into per_thread.js
joyeecheung Nov 28, 2018
f3347b6
test: cover path empty string case
lakatostamas Nov 22, 2018
2911bd3
test: verify order of error in h2 server stream
MylesBorins Nov 27, 2018
a5d57e2
esm: refactor dynamic modules
MylesBorins Nov 22, 2018
f8c5820
lib: do not register DOMException in a module
joyeecheung Nov 28, 2018
ed0ced3
src: elevate v8 namespaces referenced
juanarbol Nov 26, 2018
36ace72
test: mark test_threadsafe_function/test as flaky
gireeshpunathil Nov 29, 2018
968de69
tools: check for git tag before promoting release
rvagg Nov 27, 2018
7ef612b
tools: only sign release if promotion successful
rvagg Nov 27, 2018
d6cd146
tools: don't use GH API for commit message checks
rvagg Nov 23, 2018
317d919
url: use SafeSet to filter known special protocols
mikesamuel Nov 28, 2018
9b55ee2
build: fix c++ code coverage on macOS
refack Nov 20, 2018
75e79fc
Revert "url: make the context non-enumerable"
TimothyGu Nov 13, 2018
9dde4ff
src: set HAS_USERNAME/PASSWORD more strictly
TimothyGu Nov 13, 2018
d2994c9
url: reuse existing context in href setter
TimothyGu Nov 13, 2018
f1ce130
url: simplify native URL object construction
TimothyGu Nov 20, 2018
0a9d2ca
test: minor refactoring of onticketkeycallback
danbev Nov 29, 2018
6b8e200
src: use arraysize instead of hardcode number
leeight Nov 19, 2018
074809b
doc: cookie is joined using '; '
Flarna Nov 30, 2018
850a1af
test: show stdout and stderr in test-cli-syntax when it fails
joyeecheung Nov 29, 2018
d56a5e8
http2: make compat writeHead not crash if the stream is destroyed
mcollina Nov 29, 2018
5844a06
build: add line break as soon tests are done
BridgeAR Nov 30, 2018
84353ac
build: fix line length off by one error
BridgeAR Nov 30, 2018
3acf761
crypto: harden bignum-to-binary conversions
bnoordhuis Nov 29, 2018
c0205e8
test: check invalid argument error for option
nanomosfet Nov 30, 2018
a5e9569
tools: fix eslint usage for Node.js 8 and before
BridgeAR Nov 30, 2018
aff496c
doc: make release README link be consistent with text
ZYSzys Dec 2, 2018
e7c29e0
doc: streamline Accepting Modifications in Collaborator Guide
Trott Dec 3, 2018
9a0924c
doc: fix added version of randomFill+randomFillSync
watson Dec 3, 2018
65bac1b
doc: hide undocumented object artifacts in async_hooks
gireeshpunathil Nov 30, 2018
1831cec
test: add flag scenario in test-fs-write-file-sync
gireeshpunathil Dec 1, 2018
51fdff6
test: use ES2017 syntax in test-fs-open-*
jy95 Sep 22, 2018
daaf3a4
doc: add a note on usage scope of AliasedBuffer
gireeshpunathil Nov 29, 2018
c5bf861
test: fix `common.mustNotCall()` usage in HTTP test
addaleax Nov 30, 2018
f4083ff
fs: simplify fs.promises warning logic
cjihrig Dec 2, 2018
fda55ac
dns: simplify dns.promises warning logic
cjihrig Dec 2, 2018
4adf986
doc: revise code review guidelines
Trott Dec 2, 2018
5b4a826
build: make tar.xz creation opt-out, fail if no xz
rvagg Nov 21, 2018
cc85b9c
doc: use author's titles for linked resources
Trott Dec 4, 2018
25b72c9
doc: add triaging section to releases.md
BethGriggs Apr 19, 2018
da55d16
test: add .gitignore file for node-api
Trott Dec 4, 2018
80c9282
test: remove unused addons-napi directory
Trott Dec 4, 2018
4e2b21b
build: fix check-xz for platforms defaulting to sh
rvagg Dec 4, 2018
d0a0bbd
doc: add authority and scheme psuedo headers
kenigbolo Dec 2, 2018
81d41b5
buffer: remove checkNumberType()
cjihrig Dec 3, 2018
1a25e54
doc: list all versions WHATWG URL api was added
watson Dec 5, 2018
9197b50
lib: remove some useless assignments
devsnek Sep 25, 2018
dc728b7
build: add '.git' to 'make lint-py' exclude list
Dec 3, 2018
6563627
tools: prepare tools/install.py for Python 3
Dec 3, 2018
6dc9cb3
tools: prepare tools/genv8constants.py for Python 3
Dec 3, 2018
752ef34
test: prepare test/message/testcfg.py for Python 3
Dec 3, 2018
c013a75
test: refactor test-fs-write-file-sync.js
cjihrig Dec 4, 2018
f78d5a3
process: simplify check in previousValueIsValid()
cjihrig Dec 4, 2018
b82315a
path: replace assertPath() with validator
cjihrig Dec 4, 2018
8728bc8
src: remove finalized_ member from Hash class
danbev Dec 4, 2018
28e9a16
doc: revise Waiting for Approvals documentation
Trott Dec 5, 2018
f3d17cf
tools: prepare tools/test.py for Python 3
Dec 3, 2018
49788bb
test: prepare test/pseudo-tty/testcfg.py for Python 3
Dec 2, 2018
6a72d52
tools: prepare tools/specialize_node_d.py for Python 3
Dec 3, 2018
0b7d271
tools: prepare tools/js2c.py for Python 3
Dec 3, 2018
ccb7066
src: fix warning for potential snprintf truncation
sam-github Dec 3, 2018
6c72572
src: do not alias new and old signal masks
sam-github Dec 3, 2018
56c02c5
doc: fix order of events when request is aborted
lpinca Dec 2, 2018
77e6cb0
test: improve test-net-socket-timeout
Trott Dec 5, 2018
6ec1871
test: fix wrong parameter
zhmushan Dec 5, 2018
258f95c
test: make http2 timeout test robust
Trott Dec 6, 2018
926b664
test: move http2 test to parallel
Trott Dec 6, 2018
fedb5d8
test: move test-cli-syntax to sequential
Trott Dec 8, 2018
478c191
doc: update http doc for new Agent()/support options in socket.connect()
BeniCheni Dec 5, 2018
89f071f
build: fix compiler version detection
richardlau Dec 6, 2018
6cede0c
module: use validateString in modules/cjs
ZYSzys Dec 6, 2018
9639158
doc: update "Testing and CI" in Collaborator Guide
Trott Dec 7, 2018
8aebeed
tools: do not lint tools/inspector_protocol or tools/markupsafe
Dec 7, 2018
ea87211
doc: simplify author ready
BridgeAR Dec 7, 2018
fb4ce8b
tools: update ESLint to 5.10.0
cjihrig Dec 8, 2018
4358812
tools: prepare tools/icu/icutrim.py for Python 3
Dec 7, 2018
f59c435
module: use validateString in modules/esm
ZYSzys Dec 6, 2018
52844fa
tools: prepare tools/testp.py for Python 3
Dec 7, 2018
ea50080
tools: prepare ./tools/compress_json.py for Python 3
Dec 7, 2018
a4623b4
test: prepare test/pseudo-tty/testcfg.py Python 3
Dec 7, 2018
f0df747
test: do not lint macros files (again)
Dec 7, 2018
eafe870
test: mark test-cli-syntax as flaky/unreliable
Trott Dec 11, 2018
05655ea
doc: remove bad link to irc info
richardlau Dec 11, 2018
e1e424a
doc: add class worker documentation
yoshimoto8 Dec 5, 2018
802d0a4
test: replace callback with arrows
Shubhamurkade Nov 27, 2018
2578492
src: remove use of CallOnForegroundThread()
cjihrig Dec 9, 2018
ff840f4
doc: update Useful CI Jobs section of Collaborator Guide
Trott Dec 9, 2018
a838116
stream: fix end-of-stream for HTTP/2
addaleax Dec 9, 2018
b458c9c
test: improve internet/test-dns
IlarionHalushka Dec 9, 2018
333b954
src: create env->inspector_console_api_object earlier
joyeecheung Dec 8, 2018
c9bfe43
worker: drain messages from internal message port
yaelhe Dec 10, 2018
9c8cc31
doc: fix author-ready conflict
BridgeAR Dec 13, 2018
f903686
test: from functools import reduce in test/testpy/__init__.py
Dec 11, 2018
96b57fe
doc: update a link of npm repository
watilde Dec 11, 2018
c580057
doc: revise internal vs. public API in Collaborator Guide
Trott Dec 11, 2018
196b021
test: refactor test-enable-in-init
Dec 12, 2018
fc1293d
doc: add codebytere's info to release team
codebytere Dec 13, 2018
dcb2242
src: add GetLoadedLibraries routine
gireeshpunathil Dec 4, 2018
38724f6
src: emit 'params' instead of 'data' for NodeTracing.dataCollected
kjin Dec 10, 2018
e75e1bc
process: properly close file descriptor on exit
BridgeAR Dec 11, 2018
15d3d3d
test: mark test-child-process-execsync flaky on AIX
Trott Dec 14, 2018
d9b47a5
lib: ensure readable stream flows to end
Rantanen Dec 9, 2018
3aff725
url: remove an eslint-disable comment
cjihrig Dec 12, 2018
241986d
test: mark test-worker-memory flaky on Windows CI
Trott Dec 14, 2018
0da70ee
test: mark test-child-process-exit-code flaky
Trott Dec 14, 2018
67409ce
test: mark test-child-process-execfile flaky
Trott Dec 14, 2018
1348cd5
test: adding history regression test case
antsmartian Dec 13, 2018
af89f1a
test: use blocks instead of async IIFE
addaleax Dec 12, 2018
56175a9
stream: re-use existing `once()` implementation
addaleax Dec 12, 2018
4aa0d10
build: make lint-addon-docs run only if needed
danbev Dec 12, 2018
b1d7a2f
test: remove dead code
BridgeAR Dec 13, 2018
cc7727e
test: run eslint on test file and fix errors
BridgeAR Dec 13, 2018
5ff8aeb
test: use global.gc() instead of gc()
cjihrig Dec 13, 2018
ea548d5
test: remove unnecessary linter comment
cjihrig Dec 13, 2018
cd722e2
net: use strict comparisons for fd
cjihrig Dec 13, 2018
45e12a2
doc: make README formatting more consistent
yewenjunfighting Dec 13, 2018
f38469e
doc: add EventTarget link to worker_threads
Azard Dec 15, 2018
2d54629
doc: fix node.1 --http-parser sort order
cjihrig Dec 14, 2018
7f48299
perf_hooks: make GC tracking state per-Environment
addaleax Dec 14, 2018
5f2acc0
vm: simplify Script constructor options validation
cjihrig Dec 15, 2018
5c3a739
tools: enable no-useless-constructor lint rule
cjihrig Dec 15, 2018
d3c4cab
test: merge test with unnecessary child process
sam-github Dec 13, 2018
161dca7
tls: re-define max supported version as 1.2
sam-github Nov 28, 2018
801fb66
doc: revise "Breaking Changes" section of Collaborator Guide
Trott Dec 16, 2018
ef07faa
tools: make apilinks building more robust
joyeecheung Dec 13, 2018
078a2ba
test: test internal/util/types in vm
ZYSzys Dec 15, 2018
4bc212d
doc: document fs.write limitation with TTY
mcollina Nov 22, 2018
3d6266a
process: fix omitting `--` from `process.execArgv`
addaleax Nov 26, 2018
9da4af7
assert: fix loose deepEqual map comparison
BridgeAR Nov 30, 2018
30aa8b2
assert,util: fix sparse array comparison
BridgeAR Nov 30, 2018
156e4c8
build: set `-blibpath:` for AIX
richardlau Jan 11, 2019
1a96d83
2019-03-05, Version 10.15.3 'Dubnium' (LTS)
BethGriggs Feb 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: cherry-pick d9fbfeb from upstream V8
Original commit message:

    inspector: return [[StableObjectId]] as internal property

    This property might be useful for fast '===' check.

    [email protected],[email protected]

    Bug: none
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: Iabc3555ce1ec2c14cf0ccd40b7d964ae144e7352
    Reviewed-on: https://chromium-review.googlesource.com/1226411
    Reviewed-by: Dmitry Gozman <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Reviewed-by: Jakob Gruber <[email protected]>
    Commit-Queue: Aleksey Kozyatinskiy <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#56095}

PR-URL: #25330
alexkozy authored and rvagg committed Feb 28, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
addaleax Anna Henningsen
commit 67239ab15661145a90914e6e5caf5d8b52c96be6
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.48',
'v8_embedder_string': '-node.49',

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
41 changes: 41 additions & 0 deletions deps/v8/src/api.cc
Original file line number Diff line number Diff line change
@@ -10001,6 +10001,47 @@ debug::TypeProfile::ScriptData debug::TypeProfile::GetScriptData(
return ScriptData(i, type_profile_);
}

v8::MaybeLocal<v8::Value> debug::WeakMap::Get(v8::Local<v8::Context> context,
v8::Local<v8::Value> key) {
PREPARE_FOR_EXECUTION(context, WeakMap, Get, Value);
auto self = Utils::OpenHandle(this);
Local<Value> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key)};
has_pending_exception =
!ToLocal<Value>(i::Execution::Call(isolate, isolate->weakmap_get(), self,
arraysize(argv), argv),
&result);
RETURN_ON_FAILED_EXECUTION(Value);
RETURN_ESCAPED(result);
}

v8::MaybeLocal<debug::WeakMap> debug::WeakMap::Set(
v8::Local<v8::Context> context, v8::Local<v8::Value> key,
v8::Local<v8::Value> value) {
PREPARE_FOR_EXECUTION(context, WeakMap, Set, WeakMap);
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key),
Utils::OpenHandle(*value)};
has_pending_exception = !i::Execution::Call(isolate, isolate->weakmap_set(),
self, arraysize(argv), argv)
.ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(WeakMap);
RETURN_ESCAPED(Local<WeakMap>::Cast(Utils::ToLocal(result)));
}

Local<debug::WeakMap> debug::WeakMap::New(v8::Isolate* isolate) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
LOG_API(i_isolate, WeakMap, New);
ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate);
i::Handle<i::JSWeakMap> obj = i_isolate->factory()->NewJSWeakMap();
return ToApiHandle<debug::WeakMap>(obj);
}

debug::WeakMap* debug::WeakMap::Cast(v8::Value* value) {
return static_cast<debug::WeakMap*>(value);
}

const char* CpuProfileNode::GetFunctionNameStr() const {
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
return node->entry()->name();
1 change: 1 addition & 0 deletions deps/v8/src/api.h
Original file line number Diff line number Diff line change
@@ -124,6 +124,7 @@ class RegisteredExtension {
V(Proxy, JSProxy) \
V(debug::GeneratorObject, JSGeneratorObject) \
V(debug::Script, Script) \
V(debug::WeakMap, JSWeakMap) \
V(Promise, JSPromise) \
V(Primitive, Object) \
V(PrimitiveArray, FixedArray) \
4 changes: 3 additions & 1 deletion deps/v8/src/bootstrapper.cc
Original file line number Diff line number Diff line change
@@ -3250,7 +3250,9 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,

SimpleInstallFunction(prototype, "delete",
Builtins::kWeakMapPrototypeDelete, 1, true);
SimpleInstallFunction(prototype, "get", Builtins::kWeakMapGet, 1, true);
Handle<JSFunction> weakmap_get = SimpleInstallFunction(prototype, "get",
Builtins::kWeakMapGet, 1, true);
native_context()->set_weakmap_get(*weakmap_get);
SimpleInstallFunction(prototype, "has", Builtins::kWeakMapHas, 1, true);
Handle<JSFunction> weakmap_set = SimpleInstallFunction(
prototype, "set", Builtins::kWeakMapPrototypeSet, 2, true);
1 change: 1 addition & 0 deletions deps/v8/src/contexts.h
Original file line number Diff line number Diff line change
@@ -108,6 +108,7 @@ enum ContextLookupFlags {
V(WASM_RUNTIME_ERROR_FUNCTION_INDEX, JSFunction, \
wasm_runtime_error_function) \
V(WEAKMAP_SET_INDEX, JSFunction, weakmap_set) \
V(WEAKMAP_GET_INDEX, JSFunction, weakmap_get) \
V(WEAKSET_ADD_INDEX, JSFunction, weakset_add)

#define NATIVE_CONTEXT_FIELDS(V) \
3 changes: 3 additions & 0 deletions deps/v8/src/counters.h
Original file line number Diff line number Diff line change
@@ -730,6 +730,9 @@ class RuntimeCallTimer final {
V(Map_Has) \
V(Map_New) \
V(Map_Set) \
V(WeakMap_Get) \
V(WeakMap_Set) \
V(WeakMap_New) \
V(Message_GetEndColumn) \
V(Message_GetLineNumber) \
V(Message_GetSourceLine) \
14 changes: 14 additions & 0 deletions deps/v8/src/debug/debug-interface.h
Original file line number Diff line number Diff line change
@@ -515,6 +515,20 @@ bool SetFunctionBreakpoint(v8::Local<v8::Function> function,

v8::Platform* GetCurrentPlatform();

class WeakMap : public v8::Object {
public:
V8_WARN_UNUSED_RESULT v8::MaybeLocal<v8::Value> Get(
v8::Local<v8::Context> context, v8::Local<v8::Value> key);
V8_WARN_UNUSED_RESULT v8::MaybeLocal<WeakMap> Set(
v8::Local<v8::Context> context, v8::Local<v8::Value> key,
v8::Local<v8::Value> value);

static Local<WeakMap> New(v8::Isolate* isolate);
V8_INLINE static WeakMap* Cast(Value* obj);

private:
WeakMap();
};
} // namespace debug
} // namespace v8

26 changes: 26 additions & 0 deletions deps/v8/src/inspector/v8-debugger.cc
Original file line number Diff line number Diff line change
@@ -703,11 +703,37 @@ v8::MaybeLocal<v8::Value> V8Debugger::generatorScopes(
return getTargetScopes(context, generator, GENERATOR);
}

v8::MaybeLocal<v8::Uint32> V8Debugger::stableObjectId(
v8::Local<v8::Context> context, v8::Local<v8::Value> value) {
DCHECK(value->IsObject());
if (m_stableObjectId.IsEmpty()) {
m_stableObjectId.Reset(m_isolate, v8::debug::WeakMap::New(m_isolate));
}
v8::Local<v8::debug::WeakMap> stableObjectId =
m_stableObjectId.Get(m_isolate);
v8::Local<v8::Value> idValue;
if (!stableObjectId->Get(context, value).ToLocal(&idValue) ||
!idValue->IsUint32()) {
idValue = v8::Integer::NewFromUnsigned(m_isolate, ++m_lastStableObjectId);
stableObjectId->Set(context, value, idValue).ToLocalChecked();
}
return idValue.As<v8::Uint32>();
}

v8::MaybeLocal<v8::Array> V8Debugger::internalProperties(
v8::Local<v8::Context> context, v8::Local<v8::Value> value) {
v8::Local<v8::Array> properties;
if (!v8::debug::GetInternalProperties(m_isolate, value).ToLocal(&properties))
return v8::MaybeLocal<v8::Array>();
if (value->IsObject()) {
v8::Local<v8::Uint32> id;
if (stableObjectId(context, value).ToLocal(&id)) {
createDataProperty(
context, properties, properties->Length(),
toV8StringInternalized(m_isolate, "[[StableObjectId]]"));
createDataProperty(context, properties, properties->Length(), id);
}
}
if (value->IsFunction()) {
v8::Local<v8::Function> function = value.As<v8::Function>();
v8::Local<v8::Object> location;
6 changes: 6 additions & 0 deletions deps/v8/src/inspector/v8-debugger.h
Original file line number Diff line number Diff line change
@@ -185,6 +185,9 @@ class V8Debugger : public v8::debug::DebugDelegate {

int currentContextGroupId();

v8::MaybeLocal<v8::Uint32> stableObjectId(v8::Local<v8::Context>,
v8::Local<v8::Value>);

v8::Isolate* m_isolate;
V8InspectorImpl* m_inspector;
int m_enableCount;
@@ -241,6 +244,9 @@ class V8Debugger : public v8::debug::DebugDelegate {

std::unique_ptr<TerminateExecutionCallback> m_terminateExecutionCallback;

uint32_t m_lastStableObjectId = 0;
v8::Global<v8::debug::WeakMap> m_stableObjectId;

WasmTranslation m_wasmTranslation;

DISALLOW_COPY_AND_ASSIGN(V8Debugger);
6 changes: 6 additions & 0 deletions deps/v8/test/inspector/debugger/eval-scopes-expected.txt
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@ Tests that variables introduced in eval scopes are accessible
{
id : <messageId>
result : {
internalProperties : [
[0] : {
name : [[StableObjectId]]
value : <StablectObjectId>
}
]
result : [
[0] : {
configurable : true
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@ Tests that scopes do not report variables with empty names
{
id : <messageId>
result : {
internalProperties : [
[0] : {
name : [[StableObjectId]]
value : <StablectObjectId>
}
]
result : [
[0] : {
configurable : true
2 changes: 2 additions & 0 deletions deps/v8/test/inspector/protocol-test.js
Original file line number Diff line number Diff line change
@@ -45,6 +45,8 @@ InspectorTest.logMessage = function(originalMessage) {
var objects = [ message ];
while (objects.length) {
var object = objects.shift();
if (object && object.name === '[[StableObjectId]]')
object.value = '<StablectObjectId>';
for (var key in object) {
if (nonStableFields.has(key))
object[key] = `<${key}>`;
6 changes: 6 additions & 0 deletions deps/v8/test/inspector/runtime/es6-module-expected.txt
Original file line number Diff line number Diff line change
@@ -128,6 +128,12 @@ console.log(239)
{
id : <messageId>
result : {
internalProperties : [
[0] : {
name : [[StableObjectId]]
value : <StablectObjectId>
}
]
result : [
[0] : {
configurable : true
20 changes: 20 additions & 0 deletions deps/v8/test/inspector/runtime/get-properties-expected.txt
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ Running test: testObject5
foo own string cat
Internal properties
[[PrimitiveValue]] number 5
[[StableObjectId]]: <stableObjectId>

Running test: testNotOwn
__defineGetter__ inherited function undefined
@@ -23,6 +24,8 @@ Running test: testNotOwn
toLocaleString inherited function undefined
toString inherited function undefined
valueOf inherited function undefined
Internal properties
[[StableObjectId]]: <stableObjectId>

Running test: testAccessorsOnly
b own no value, getter, setter
@@ -34,6 +37,8 @@ Running test: testArray
2 own string blue
__proto__ own object undefined
length own number 3
Internal properties
[[StableObjectId]]: <stableObjectId>

Running test: testBound
__proto__ own function undefined
@@ -42,14 +47,19 @@ Running test: testBound
Internal properties
[[BoundArgs]] object undefined
[[BoundThis]] object undefined
[[StableObjectId]]: <stableObjectId>
[[TargetFunction]] function undefined

Running test: testObjectThrowsLength
__proto__ own object undefined
length own no value, getter
Internal properties
[[StableObjectId]]: <stableObjectId>

Running test: testTypedArrayWithoutLength
__proto__ own object undefined
Internal properties
[[StableObjectId]]: <stableObjectId>

Running test: testArrayBuffer
[[Int8Array]]
@@ -62,6 +72,8 @@ Running test: testArrayBuffer
6 own number 1
7 own number 1
__proto__ own object undefined
Internal properties
[[StableObjectId]]: <stableObjectId>
[[Uint8Array]]
0 own number 1
1 own number 1
@@ -72,18 +84,26 @@ Running test: testArrayBuffer
6 own number 1
7 own number 1
__proto__ own object undefined
Internal properties
[[StableObjectId]]: <stableObjectId>
[[Int16Array]]
0 own number 257
1 own number 257
2 own number 257
3 own number 257
__proto__ own object undefined
Internal properties
[[StableObjectId]]: <stableObjectId>
[[Int32Array]]
0 own number 16843009
1 own number 16843009
__proto__ own object undefined
Internal properties
[[StableObjectId]]: <stableObjectId>

Running test: testArrayBufferWithBrokenUintCtor
[[Int8Array]] own object undefined
[[Uint8Array]] own object undefined
__proto__ own object undefined
Internal properties
[[StableObjectId]]: <stableObjectId>
Original file line number Diff line number Diff line change
@@ -54,6 +54,10 @@ Testing regular Proxy
value : false
}
}
[3] : {
name : [[StableObjectId]]
value : <StablectObjectId>
}
]
result : [
]
@@ -114,6 +118,10 @@ Testing revocable Proxy
value : false
}
}
[3] : {
name : [[StableObjectId]]
value : <StablectObjectId>
}
]
result : [
]
@@ -166,6 +174,10 @@ Testing revocable Proxy
value : true
}
}
[3] : {
name : [[StableObjectId]]
value : <StablectObjectId>
}
]
result : [
]
5 changes: 4 additions & 1 deletion deps/v8/test/inspector/runtime/get-properties.js
Original file line number Diff line number Diff line change
@@ -94,7 +94,10 @@ async function logGetPropertiesResult(objectId, flags = { ownProperties: true })
for (var i = 0; i < internalPropertyArray.length; i++) {
var p = internalPropertyArray[i];
var v = p.value;
InspectorTest.log(" " + p.name + " " + v.type + " " + v.value);
if (p.name !== '[[StableObjectId]]')
InspectorTest.log(" " + p.name + " " + v.type + " " + v.value);
else
InspectorTest.log(" [[StableObjectId]]: <stableObjectId>");
}
}

Loading