Commit Graph

1137 Commits

Author SHA1 Message Date
jochen
bf032c2ec8 Update ReturnValue to take non-deprecated versions of handles
R=vogelheim@chromium.org
BUG=none
LOG=n

Review URL: https://codereview.chromium.org/1145063002

Cr-Commit-Position: refs/heads/master@{#28501}
2015-05-20 08:59:34 +00:00
yangguo
9a1490ad6f Introduce extras export object.
BUG=

Review URL: https://codereview.chromium.org/1140333003

Cr-Commit-Position: refs/heads/master@{#28499}
2015-05-20 07:38:04 +00:00
rossberg
2fa664fbe2 Reland "[strong] Object literals create strong objects"
(patchset #4 id:60001 of https://codereview.chromium.org/1134333005/)"

This reverts commit 81c080ef8e.
Patchset #1 is the original CL.
Patchset #2 fixes a handlification bug that caused the crash.

R=dslomov@chromium.org
BUG=v8:3956
LOG=N

Review URL: https://codereview.chromium.org/1143813002

Cr-Commit-Position: refs/heads/master@{#28497}
2015-05-20 07:07:42 +00:00
ssid
66083dd05f Adding api to get last gc object statistics for chrome://tracing.
For dumping the number of objects and size of objects alive after the
last gc into chrome://tracing memory dumps, this CL adds new api to
get these number for each isolate.

Note: Chrome should be run with --js-flags='--track_gc_object_stats
--noincremental-marking' for object tracking.

BUG=476013
LOG=Y

Review URL: https://codereview.chromium.org/1113233002

Cr-Commit-Position: refs/heads/master@{#28474}
2015-05-19 11:01:24 +00:00
machenbach
81c080ef8e Revert of [strong] Object literals create strong objects (patchset #4 id:60001 of https://codereview.chromium.org/1134333005/)
Reason for revert:
[Sheriff] Segmentation fault on arm64 with nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%201/builds/1990

Original issue's description:
> [strong] Object literals create strong objects
>
> R=dslomov@chromium.org
> BUG=v8:3956
> LOG=N
>
> Committed: https://crrev.com/fe6598cffb82ec4180dcc2e2310e77d07a803f96
> Cr-Commit-Position: refs/heads/master@{#28444}

TBR=dslomov@chromium.org,arv@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3956

Review URL: https://codereview.chromium.org/1135493006

Cr-Commit-Position: refs/heads/master@{#28464}
2015-05-19 07:35:54 +00:00
horo
c5eb9573e7 [V8] Added Script::is_opaque flag for embedders
When the page is controlled by a ServiceWorker, the ServiceWorker can return an opaque (non-CORS cross origin) resource response.
We need to treat the messages from such script resource as opaque.

Committed: https://crrev.com/7a599c5e1242d3c5ab7515ee149623da90ae69ec
Cr-Commit-Position: refs/heads/master@{#28445}

Review URL: https://codereview.chromium.org/1140673002

Cr-Commit-Position: refs/heads/master@{#28459}
2015-05-19 03:11:23 +00:00
machenbach
91f38435ea Revert of [V8] Added Script::is_opaque flag for embedders (patchset #5 id:80001 of https://codereview.chromium.org/1140673002/)
Reason for revert:
[Sheriff] Breaks chromium win compilation:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Win/builds/96

Original issue's description:
> [V8] Added Script::is_opaque flag for embedders
>
> When the page is controlled by a ServiceWorker, the ServiceWorker can return an opaque (non-CORS cross origin) resource response.
> We need to treat the messages from such script resource as opaque.
>
> Committed: https://crrev.com/7a599c5e1242d3c5ab7515ee149623da90ae69ec
> Cr-Commit-Position: refs/heads/master@{#28445}

TBR=mkwst@chromium.org,jochen@chromium.org,yangguo@chromium.org,horo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1135343005

Cr-Commit-Position: refs/heads/master@{#28449}
2015-05-18 14:54:42 +00:00
horo
7a599c5e12 [V8] Added Script::is_opaque flag for embedders
When the page is controlled by a ServiceWorker, the ServiceWorker can return an opaque (non-CORS cross origin) resource response.
We need to treat the messages from such script resource as opaque.

Review URL: https://codereview.chromium.org/1140673002

Cr-Commit-Position: refs/heads/master@{#28445}
2015-05-18 13:54:24 +00:00
rossberg
fe6598cffb [strong] Object literals create strong objects
R=dslomov@chromium.org
BUG=v8:3956
LOG=N

Review URL: https://codereview.chromium.org/1134333005

Cr-Commit-Position: refs/heads/master@{#28444}
2015-05-18 13:23:17 +00:00
hablich
1d7a513ff0 Update version to 4.5
BUG=
TBR=machenbach@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/1123393006

Cr-Commit-Position: refs/heads/master@{#28435}
2015-05-17 06:08:16 +00:00
jochen
7590d302e3 Fix deprecation declarations in headers
BUG=none
R=ulan@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1127963005

Cr-Commit-Position: refs/heads/master@{#28407}
2015-05-15 01:48:20 +00:00
yurys
ae6ec1861e Provide accessor for object internal properties that doesn't require debugger to be active
Some of the DevTools' clients need to inspect JS objects without enabling debugger. This CL allows to inspect object's internal properties without enabling debugger and instantiating debug context.

Note that now debug context can be created lazily if v8::Debug::GetDebugContext is called when there is no debug listener. This is fragile and has already resulted in some subtle error. I'm going to fix that in a separate CL.

BUG=chromium:481845
LOG=Y

Review URL: https://codereview.chromium.org/1134193002

Cr-Commit-Position: refs/heads/master@{#28371}
2015-05-12 15:40:27 +00:00
yangguo
396236bfa0 Revert of Provide accessor for object internal properties that doesn't require debugger to be active (patchset #3 id:40001 of https://codereview.chromium.org/1126103006/)
Reason for revert:
GC mole issues: https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux%20-%20gcmole/builds/1950/steps/GCMole%20ia32/logs/stdio

Original issue's description:
> Provide accessor for object internal properties that doesn't require debugger to be active
>
> Some of the DevTools' clients need to inspect JS objects without enabling debugger. This CL allows to inspect object's internal properties without enabling debugger and instantiating debug context.
>
> Note that now debug context can be created lazily if v8::Debug::GetDebugContext is called when there is no debug listener. This is fragile and has already resulted in some subtle error. I'm going to fix that in a separate CL.
>
> BUG=chromium:481845
> LOG=Y
>
> Committed: https://crrev.com/bdeb0de88c8cf5f2c78f261b45314138f525110d
> Cr-Commit-Position: refs/heads/master@{#28362}

TBR=pfeldman@chromium.org,kozyatinskiy@chromium.org,yurys@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:481845

Review URL: https://codereview.chromium.org/1133243002

Cr-Commit-Position: refs/heads/master@{#28365}
2015-05-12 13:03:52 +00:00
yurys
bdeb0de88c Provide accessor for object internal properties that doesn't require debugger to be active
Some of the DevTools' clients need to inspect JS objects without enabling debugger. This CL allows to inspect object's internal properties without enabling debugger and instantiating debug context.

Note that now debug context can be created lazily if v8::Debug::GetDebugContext is called when there is no debug listener. This is fragile and has already resulted in some subtle error. I'm going to fix that in a separate CL.

BUG=chromium:481845
LOG=Y

Review URL: https://codereview.chromium.org/1126103006

Cr-Commit-Position: refs/heads/master@{#28362}
2015-05-12 12:38:15 +00:00
yurys
cf07add227 Don't create debug context if debug listener is not set
If there had been no debug listener v8::Debug::GetDebugContext would have created new context and wouln't have kept reference to it. This way we may well end up with several debug contexts and disabled debugger.

As a side effect this change allows to efficiently distinguish debug context from blink contexts by simply comparing handles.

BUG=chromium:482290
LOG=Y

Review URL: https://codereview.chromium.org/1136733002

Cr-Commit-Position: refs/heads/master@{#28356}
2015-05-12 07:33:18 +00:00
jochen
ae87d088bc Deprecate Isolate::New
Embedders need to always pass CreateParams now

BUG=none
LOG=y
R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/1133723004

Cr-Commit-Position: refs/heads/master@{#28353}
2015-05-12 04:59:40 +00:00
erikcorry
5bc51bb454 Postpone counters triggered during GC, and use a HandleScope when calling back.
R=jkummerow@chromium.org,hpayer@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1125383007

Cr-Commit-Position: refs/heads/master@{#28335}
2015-05-11 10:57:53 +00:00
machenbach
19a28dcefd Revert of Add the concept of a V8 extras exports object (patchset #5 id:80001 of https://codereview.chromium.org/1128113006/)
Reason for revert:
[Sheriff] Causes gc stress failures:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/builds/2167

Original issue's description:
> Add the concept of a V8 extras exports object
>
> Exposed to the extras as extrasExports (on the builtins object), on
> which they can put things that should be accessible from C++. Exposed
> to C++ through the V8 API as v8::Context::GetExtrasExportsObject().
>
> Adding a test (in test-api.cc) required adding a simple extra,
> test-extra.js, which we build into the standalone builds.
>
> R=yangguo@chromium.org, jochen@chromium.org
> BUG=
>
> Committed: https://crrev.com/ad547cea05f3e02c67243b682e933fc53ac763d9
> Cr-Commit-Position: refs/heads/master@{#28317}

TBR=jochen@chromium.org,yangguo@chromium.org,domenic@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1127313005

Cr-Commit-Position: refs/heads/master@{#28332}
2015-05-11 08:19:58 +00:00
domenic
ad547cea05 Add the concept of a V8 extras exports object
Exposed to the extras as extrasExports (on the builtins object), on
which they can put things that should be accessible from C++. Exposed
to C++ through the V8 API as v8::Context::GetExtrasExportsObject().

Adding a test (in test-api.cc) required adding a simple extra,
test-extra.js, which we build into the standalone builds.

R=yangguo@chromium.org, jochen@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1128113006

Cr-Commit-Position: refs/heads/master@{#28317}
2015-05-08 12:06:35 +00:00
ben
6618793e87 Add ObjectTemplate::New() taking FunctionTemplate.
I know the bug has been closed but this seems like a simple addition that may
be useful in other ways as well.

BUG=v8:2180
LOG=N

Review URL: https://codereview.chromium.org/1128553002

Cr-Commit-Position: refs/heads/master@{#28261}
2015-05-06 14:10:44 +00:00
bmeurer
64d7340439 [c++11] Remove remnants of pre-C++11 delete, final and override.
These macros are not needed anymore, so there's no point in supporting
them.

Review URL: https://codereview.chromium.org/1123723003

Cr-Commit-Position: refs/heads/master@{#28214}
2015-05-05 07:44:35 +00:00
jochen
98140318fa Unify internal and external typed arrays a bit
Just give internal ones an ArrayBuffer with a NULL backing store. This
simplifies the access checks a lot.

BUG=v8:3996
R=hpayer@chromium.org,verwaest@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1109353003

Cr-Commit-Position: refs/heads/master@{#28168}
2015-04-30 13:46:34 +00:00
Jochen Eisinger
66f428dd37 Bump Isolate::New back to deprecate soon
R=machenbach@chromium.org
TBR=machenbach@chromium.org

Review URL: https://codereview.chromium.org/1115133002

Cr-Commit-Position: refs/heads/master@{#28152}
2015-04-30 09:44:55 +00:00
jochen
9ba5fe028f Pass ArrayBuffer::Allocator via Isolate::CreateParams
We shouldn't have shared state between isolates by default. The embedder
is free to pass the same allocator to all isolates it creates.

BUG=none
R=dcarney@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1116633002

Cr-Commit-Position: refs/heads/master@{#28127}
2015-04-29 09:54:43 +00:00
machenbach
4c1f9d53cf Revert of deprecate non-phantom weak callbacks (patchset #1 id:1 of https://codereview.chromium.org/1103173002/)
Reason for revert:
[Sheriff] This is still used and now blocks the roll here:
http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/47889

Original issue's description:
> Reland: deprecate non-phantom weak callbacks
>
> BUG=
>
> Committed: https://crrev.com/3be656fb55ad49834ec8ec0a57ba858bb1b21f37
> Cr-Commit-Position: refs/heads/master@{#28094}

TBR=jochen@chromium.org,dcarney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1117623002

Cr-Commit-Position: refs/heads/master@{#28121}
2015-04-29 05:57:15 +00:00
ssid
0a1352a716 Extending v8::GetHeapStatistics to return total available size.
For dumping memory statistics about v8 heap, we need the total
available size of the heap. This CL adds extra field in HeapStatistics
to return the available size.

BUG=476013
LOG=Y

Review URL: https://codereview.chromium.org/1104123002

Cr-Commit-Position: refs/heads/master@{#28100}
2015-04-28 10:57:15 +00:00
dcarney
3be656fb55 Reland: deprecate non-phantom weak callbacks
BUG=

Review URL: https://codereview.chromium.org/1103173002

Cr-Commit-Position: refs/heads/master@{#28094}
2015-04-28 08:31:24 +00:00
machenbach
c5797f859a Revert of deprecate non-phantom weak callbacks (patchset #1 id:1 of https://codereview.chromium.org/1103173002/)
Reason for revert:
[Sheriff] Fails compilation on chromium android:
http://build.chromium.org/p/client.v8/builders/Android%20Builder/builds/4131

Is the chromium version our builder used maybe too old (it uses lkcr)? In that case please reland as soon as it's up-to-date.

Original issue's description:
> deprecate non-phantom weak callbacks
>
> BUG=
>
> Committed: https://crrev.com/39c31da2142ab0fca9dae279b9e59cd4951a1982
> Cr-Commit-Position: refs/heads/master@{#28077}

TBR=jochen@chromium.org,dcarney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1104163002

Cr-Commit-Position: refs/heads/master@{#28079}
2015-04-27 13:30:19 +00:00
dcarney
39c31da214 deprecate non-phantom weak callbacks
BUG=

Review URL: https://codereview.chromium.org/1103173002

Cr-Commit-Position: refs/heads/master@{#28077}
2015-04-27 13:06:18 +00:00
yangguo
10b979e6aa Debugger: clean up debug events.
The debug event BreakForCommand is now deprecated, as it cannot happen any longer.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/1089893002

Cr-Commit-Position: refs/heads/master@{#28071}
2015-04-27 12:10:00 +00:00
dcarney
8a9fe731fb add StdGlobalValueMap
BUG=

Review URL: https://codereview.chromium.org/1104463002

Cr-Commit-Position: refs/heads/master@{#27994}
2015-04-22 09:17:34 +00:00
jochen
d707942d47 Add myself to include/OWNERS
BUG=none
R=danno@chromium.org
LOG=n
NOTRY=true

Review URL: https://codereview.chromium.org/1098873002

Cr-Commit-Position: refs/heads/master@{#27957}
2015-04-21 10:05:59 +00:00
dcarney
202a97c88e make Handle a synonym of Local
R=svenpanne@chromium.org

BUG=

Review URL: https://codereview.chromium.org/679143002

Cr-Commit-Position: refs/heads/master@{#27951}
2015-04-21 08:15:57 +00:00
jochen
ad854ea11e Allow for accessing an ArrayBuffer contents without externalizing it
The embedder has to take appropriate steps to ensure that the
ArrayBuffer doesn't die while it's accessing the pointer, e.g. keep a
Local handle to it around

BUG=none
R=dslomov@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1095083002

Cr-Commit-Position: refs/heads/master@{#27942}
2015-04-20 15:01:43 +00:00
jochen
53cc6486df Remove support for externally backed elements from the API
Embedders should use ArrayBuffers instead

BUG=v8:3996
LOG=y
R=verwaest@chromium.org,dslomov@chromium.org,kbr@chromium.org

Review URL: https://codereview.chromium.org/1092923002

Cr-Commit-Position: refs/heads/master@{#27939}
2015-04-20 13:31:27 +00:00
jochen
36f17ed030 Deprecate 3-args ResourceConstraints::ConfigureDefaults
Embedders should use the 2-args version. Number of cores is just
ignored.

BUG=none
R=dcarney@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1080633006

Cr-Commit-Position: refs/heads/master@{#27938}
2015-04-20 13:26:21 +00:00
Ross McIlroy
063fc25122 Replace OVERRIDE->override and FINAL->final since we now require C++11.
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1088993003

Cr-Commit-Position: refs/heads/master@{#27937}
2015-04-20 13:08:14 +00:00
ssid
4a597f527a Adding missing V8_EXPORT flag in SpaceStatistics class in v8.h
This class was added in crrev.com/1058253003 and missed V8_EXPORT in
definition.

BUG=466141, 476013
LOG=Y

Review URL: https://codereview.chromium.org/1090333002

Cr-Commit-Position: refs/heads/master@{#27926}
2015-04-17 19:33:13 +00:00
ssid
281d30d758 Adding V8 api to get memory statistics of spaces in V8::Heap.
This is first step towards adding V8 heap statistics to the memory
tracing infrastructure. For being able to get useful memory number into
the memory dump, v8 needs to provide an external api needs to obtain
more information about the heap. So, this Cl extends the api to give
information about the memory allocated and used in the spaces.

BUG=466141, 476013
LOG=Y

Review URL: https://codereview.chromium.org/1058253003

Cr-Commit-Position: refs/heads/master@{#27919}
2015-04-17 14:04:24 +00:00
jochen
47cca4684e Remove support for specifying the number of available threads
The embedder can control how many threads it wants to use via the
v8::Platform implementation. V8 internally doesn't spin up threads
anymore. If the embedder doesn't want to use any threads at all, it's
v8::Platform implementation must either run the background jobs on
the foreground thread, or the embedder should specify --predictable

BUG=none
R=yangguo@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1064723005

Cr-Commit-Position: refs/heads/master@{#27833}
2015-04-15 07:15:43 +00:00
jochen
ac23150fd2 When converting Maybe and MaybeLocal values with a check, always check
An embedder that wants to avoid the check should use MaybeLocal::ToLocal.

BUG=none
R=dcarney@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1083943002

Cr-Commit-Position: refs/heads/master@{#27832}
2015-04-15 07:11:50 +00:00
smcgruer
a684535693 Restore V8_LIBC_UCLIBC as a libc option.
As uClibc defines __GLIBC__ in an attempt to look like glibc, V8_LIBC_GLIBC
was true for uClibc as well. Checking for uClibc before glibc fixes this
and restores the correct behavior.

BUG=

Review URL: https://codereview.chromium.org/1066573005

Cr-Commit-Position: refs/heads/master@{#27806}
2015-04-14 07:54:26 +00:00
jochen
ada32ae636 Expose ArrayBufferView::HasBuffer
This allows the embedder to decide whether it's worthwhile to copy the
contents to avoid materializing a buffer.

BUG=v8:3996
R=dslomov@chromium.org,kbr@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1084513002

Cr-Commit-Position: refs/heads/master@{#27782}
2015-04-13 11:27:58 +00:00
fedor
1f85559a69 api: introduce SealHandleScope
When debugging Handle leaks in io.js we found it very convenient to be
able to Seal some specific (root in our case) scope to prevent Handle
allocations in it, and easily find leakage.

R=yangguo
BUG=

Review URL: https://codereview.chromium.org/1079713002

Cr-Commit-Position: refs/heads/master@{#27766}
2015-04-10 23:17:09 +00:00
verwaest
4bd9bdbb28 Reland "Merge cellspace into old pointer space"
This fixes the arm(64) and mips(64) write barriers

BUG=

Review URL: https://codereview.chromium.org/1073133002

Cr-Commit-Position: refs/heads/master@{#27751}
2015-04-10 13:54:10 +00:00
dcarney
e7ba4791e5 simplify GlobalValueMap calls to DisposeWeak
BUG=

Review URL: https://codereview.chromium.org/1074153002

Cr-Commit-Position: refs/heads/master@{#27750}
2015-04-10 13:40:31 +00:00
jochen
f56fb72f98 Special case the "empty string" root so it doesn't constantly jump around
BUG=none
R=hpayer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1075133002

Cr-Commit-Position: refs/heads/master@{#27736}
2015-04-10 09:23:44 +00:00
thakis
1f7a7b32d7 Fix C++ violation.
gcc rejects the following snippet, clang rejects it in -std=c++11 mode:
  namespace A { template<class T> class C {}; }
  namespace B { template class A::C<int>; }

Indeed, the C++ standard says in 14.7.2p2 "An explicit instantiation shall
appear in an enclosing namespace of its template", so cl.exe is incorrect to
allow this.

Just move the instantiation out of the v8 namespace to fix.  No intended
behavior change.  Fixes building with clang-cl on Windows.

BUG=chromium:475643
LOG=N
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/1073903002

Cr-Commit-Position: refs/heads/master@{#27721}
2015-04-09 21:22:50 +00:00
adamk
9e3e0aaa88 Revert of Merge cellspace into old pointer space (patchset #8 id:180001 of https://codereview.chromium.org/1010803012/)
Reason for revert:
Causes test failures on ARM bots related to cells and write barriers.

Original issue's description:
> Merge cellspace into old pointer space
>
> BUG=
>
> Committed: https://crrev.com/4e7163ce05f135918205c7855ae60a48e5d46cc5
> Cr-Commit-Position: refs/heads/master@{#27707}

TBR=hpayer@chromium.org,balazs.kilvady@imgtec.com,yangguo@chromium.org,verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1053243003

Cr-Commit-Position: refs/heads/master@{#27711}
2015-04-09 18:16:40 +00:00
verwaest
4e7163ce05 Merge cellspace into old pointer space
BUG=

Review URL: https://codereview.chromium.org/1010803012

Cr-Commit-Position: refs/heads/master@{#27707}
2015-04-09 13:34:21 +00:00