Commit Graph

633 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
6d92511162 Reland "Remove IsInitialized checks from inlined API functions."
The initialization sequence in Blink has been adapted to use explicit
isolate initialization instead of through calling v8::Null() as the
first API call.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 08:11:50 +00:00
dslomov@chromium.org
4308fb462d API for DataView.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:23:50 +00:00
mstarzinger@chromium.org
48c16454b1 Revert "Remove IsInitialized checks from inlined API functions."
This reverts r15277 due to failures in layout tests. Apparently Blink
still initializes the Isolate by calling v8::Null() as the first API
function on some paths.

TBR=svenpanne@chromium.org
TEST=webkit:crypto/worker-random-values-concurrent.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:10:40 +00:00
mstarzinger@chromium.org
9ef18efff6 Remove IsInitialized checks from inlined API functions.
R=marja@chromium.org, svenpanne@chromium.org
TEST=cctest/test-api

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 08:58:01 +00:00
dslomov@chromium.org
91eb5f8d25 DataView implementation.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 13:02:38 +00:00
yurys@chromium.org
7f1750580c V8 API: Add a missing NULL check into Isolate::GetCurrentContext().
There is a missing NULL check for: "internal_isolate->context() != NULL".
Right now before calling this method one should call v8::Context::InContext()
first to perform this check, otherwise we may crash. But this static method
will do this check on the current isolate, which may not be the same as a given one.

BUG=249655
R=yurys@chromium.org,mvstanton@chromium.org

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

Patch from Andrey Adaykin <aandrey@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 12:34:47 +00:00
yurys@chromium.org
6f09cb471b Delete deprecated methods from v8-profiler.h
All these methods were already marked as V8_DEPRECATED in V8 Version 3.18.0 (see https://code.google.com/p/v8/source/browse/trunk/include/v8-profiler.h?r=14304) so it is time to delete them.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 07:56:22 +00:00
yurys@chromium.org
c7b3ef0e05 Make sure ExternalCallbackScope is always created when VM state changes to EXTERNAL
ExternalCallbackScope is used to let CPU profiler know which API callback is being executed. Whenever such callback is called we should create VMState<ETERNAL> and ExternalCallbackScope. This patch fixes several places where VMState<ETERNAL> went without ExternalCallbackScope.

BUG=244580
R=dcarney@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 14:47:35 +00:00
hpayer@chromium.org
77f5c6c122 Don't let the GC clear the cache between cache invocations to pass test.
BUG=
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 11:23:34 +00:00
dcarney@chromium.org
640353d088 remove all old style callbacks - patch 1 of many
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 08:12:59 +00:00
dcarney@chromium.org
89fb509c77 remove all old style callbacks - patch 2
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 08:07:45 +00:00
yurys@chromium.org
2ab2e4843e Introduce THREADED_PROFILED_TEST macro
A bunch of tests in test-api.cc need to be executed two times: with CPU profiler on and off to check different code paths. There are only two such tests at the moment but I'm going to add more and having this logic duplicated in all these tests look awkward. The tests are executed as part of Threading* tests and there is no much sense in running CPU profiler in that case. This change addresses both problems by introducing THREADED_PROFILED_TEST macro which mosly resembles THREADED_TEST except that when such test is executed as a standalone test (not part of a test-api/Threading*) it will first run the test normally and the start CPU profiler and run the test again.

BUG=244580
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 06:46:56 +00:00
dcarney@chromium.org
b0860dd2b0 arm build fix for 15142
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 10:49:57 +00:00
dcarney@chromium.org
022ee63f5c build fix for 15142
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 10:34:12 +00:00
yurys@chromium.org
c4224f09a2 Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case. Indirect call happens only if CpuProfiler::is_profiling() is true.

This is exactly same change as r15116 with a build fix for test-api.cc

BUG=244580
TBR=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 19:16:35 +00:00
yurys@chromium.org
24ec017182 Revert "Notify CPU profiler when calling native getters"
This reverts commit f323d984a73bab345c4eab5c1907552ccfa7ccaa.

Broke compilation on the bots with an error that doesn't occur locally:

  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-bignum-dtoa.o
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = int]’:
../test/cctest/test-api.cc:1129: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = unsigned int]’:
../test/cctest/test-api.cc:1136: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = double]’:
../test/cctest/test-api.cc:1143: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = bool]’:
../test/cctest/test-api.cc:1150: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = void]’:
../test/cctest/test-api.cc:1157: error: insufficient contextual information to determine type
  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-circular-queue.o

BUG=None
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 14:05:19 +00:00
yurys@chromium.org
1a3c3cee9d Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case.

BUG=244580
R=dcarney@chromium.org, loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 13:46:33 +00:00
dcarney@chromium.org
608a6b8965 another attempt at fixing 15107
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 10:39:44 +00:00
dcarney@chromium.org
67c9cd8274 build fix for 15107
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 10:13:09 +00:00
dcarney@chromium.org
8b2c26d736 remove most uses of raw handle constructors
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 09:27:09 +00:00
dcarney@chromium.org
9103afa291 Deprecate the version of MakeWeak which takes an Isolate.
BUG=NONE
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 07:23:23 +00:00
dslomov@chromium.org
9278a4b7b1 Change ArrayBuffer API and implementation to use embedder-provided allocator.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 10:41:14 +00:00
dcarney@chromium.org
c90e697a30 make empty string returnable by ReturnValue
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 07:42:12 +00:00
dcarney@chromium.org
a9ce5bb5ea add a default value for return value
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 07:41:16 +00:00
dcarney@chromium.org
8c892ea2a8 do aligned reads in ContainsOnlyOneByte
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 07:34:58 +00:00
dslomov@chromium.org
cbb11dbe6c Neutering API for v8::ArrayBuffer
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 15:02:20 +00:00
dcarney@chromium.org
72098711b7 Add Value::Cast.
It's needed for upcasting Persistent<Object> to Persistent<Value> after
handlepocalypse (with Persistent::As or Persistent::Cast).

BUG=
R=svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 08:46:39 +00:00
dcarney@chromium.org
94d6a13682 build fix for build fix for 14990
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 08:15:00 +00:00
dcarney@chromium.org
3c8a79caba ReturnValue::Set(uint32_t) is wrong
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-07 07:34:25 +00:00
dcarney@chromium.org
6f5d899248 add function to test whether string contents are definitely one byte
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 13:16:52 +00:00
dcarney@chromium.org
c6519a142f update test to test new style property handlers
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-06 12:23:37 +00:00
danno@chromium.org
f6caad4b6b Fix EntryHookStub on ia32 and x64.
These stubs were computing the return address location incorrectly.
Add testing for same.

R=danno@chromium.org

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

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-05 21:02:29 +00:00
dcarney@chromium.org
2380eff265 Remove V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS.
Blink has migrated to use the new style visitors.

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 13:36:18 +00:00
mstarzinger@chromium.org
f8db2414f2 Deprecate FACTORY helper macro.
This removes the FACTORY helper macro to avoid accidental TLS access
when using the factory. Most internal code has access to the Isolate by
now whereas tests which are not performance critical still heavily use
TLS access through explicit Isolate::Current() calls.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 10:30:05 +00:00
dcarney@chromium.org
7d55c16389 remove V8_ALLOW_ACCESS_TO_PERSISTENT_IMPLICIT and V8_ALLOW_ACCESS_TO_PERSISTENT_ARROW
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 10:02:02 +00:00
dcarney@chromium.org
0fbfdf1699 ReturnValue::Set needs to check for empty handles
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-31 11:06:50 +00:00
yurys@chromium.org
09959efe41 Add support for //# sourceURL similar to deprecated //@ sourceURL one.
BUG=v8:2702
R=yangguo@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 12:40:21 +00:00
dcarney@chromium.org
ccae2a75ca remove remaining V8_ALLOW_ACCESS_TO* defines from test classes
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 11:04:10 +00:00
dcarney@chromium.org
f16ebc61c9 Delete old GC related APIs.
Blink doesn't use them any more, and they have no other known users either.

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:52:01 +00:00
dcarney@chromium.org
515aec2014 Transforming PersistentHandleVisitor to not need to copy Persistent handles.
This gets rid of more places where Persistent handles are copied
(see crbug.com/236290 ).

Transition plan: after this CL, Blink will be modified to work both with and
without the #define, then the #define will be removed from V8.

The corresponding Blink side changes are in https://codereview.chromium.org/15670010/ .

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:48:37 +00:00
dcarney@chromium.org
f8039eff6c fix return out of handlescope in NestedLockers
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 08:33:46 +00:00
dcarney@chromium.org
eecc9ff8f1 remove use of context scope with persistent argument
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 10:36:21 +00:00
dcarney@chromium.org
f69727d849 Add template parameter to ReturnValue::Set.
E.g., v8-i18n wants to set the return value with a different type of a Persistent.

BUG=NONE
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 14:34:16 +00:00
dcarney@chromium.org
81e5778718 make isolate accessible from returnvalue
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 11:50:08 +00:00
svenpanne@chromium.org
dc9e80beec fix thread safety issue in FunctionTemplate test
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 09:32:10 +00:00
dcarney@chromium.org
91efd1e7d7 callback handler map not correctly populated by direct use of SetCallHandler
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 07:59:33 +00:00
dslomov@chromium.org
28729d24a4 Fix Windows build after r14770
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 10:29:28 +00:00
dslomov@chromium.org
fc73052dc2 Externalization API for ArrayBuffer
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 10:01:42 +00:00
dcarney@chromium.org
1045d62733 implement fast ReturnValue setters
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 06:35:38 +00:00
dcarney@chromium.org
881476a7af new style of property/function callbacks
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 06:36:24 +00:00