ulan@chromium.org
4bd4fb1aa4
Throw a more descriptive exception when blocking 'eval' via CSP.
...
BUG=140191
R=svenpanne@chromium.org ,mkwst@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10837358
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 09:58:22 +00:00
danno@chromium.org
48d327d0b4
Let the embedder store arbitrary Values via Context::SetData
...
In WebKit, we would like to store a void* to a data structure that contains
lots of exciting per-context data. The current API restricts us to storing only
Strings, which is less useful.
I've also cleaned up the implementation of GetData to be less convoluted.
Review URL: https://codereview.chromium.org/10907189
Patch from Adam Barth <abarth@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 16:13:23 +00:00
yangguo@chromium.org
6a9e4048aa
Introduce new API to expose external string resource regardless of encoding.
...
BUG=
Review URL: https://chromiumcodereview.appspot.com/10917211
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 11:29:50 +00:00
svenpanne@chromium.org
7af6883098
Fixed deoptimization of inlined getters.
...
It is necessary to explicitly handle the internal frame lying between the caller
of the getter and the getter itself in the deoptimizer: When the getter is
inlined, leaving the internal frame restores the correct context.
BUG=http://crbug/134609
TEST=mjsunit/regress/regress-crbug-134609
Review URL: https://chromiumcodereview.appspot.com/10910110
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-07 09:01:54 +00:00
yangguo@chromium.org
5ac2a5d22e
Revert r12430, r12432, r12433 (basic support for Latin1).
...
BUG=
Review URL: https://chromiumcodereview.appspot.com/10905075
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-04 12:23:22 +00:00
yangguo@chromium.org
74f06b1f99
Add basic support for Latin1 to the API.
...
BUG=
Review URL: https://chromiumcodereview.appspot.com/10857030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:06:36 +00:00
yangguo@chromium.org
5dd51bafef
Cache results in SearchRegExpMultiple.
...
BUG=
Review URL: https://chromiumcodereview.appspot.com/10837290
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-31 09:28:01 +00:00
yangguo@chromium.org
4e2027bbc2
Revert r12379 (Add checks to external string API).
...
R=ulan@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10897027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-29 15:23:48 +00:00
jkummerow@chromium.org
f9d4856289
Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
...
BUG=None
TEST=Included in CL.
Committed: https://code.google.com/p/v8/source/detail?r=12389
Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 14:43:28 +00:00
verwaest@chromium.org
a713f82aa6
Revert "Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers."
...
This reverts commit r12389.
TBR=jkummerow@chromium.org , CC=siggi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10870108
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 19:47:02 +00:00
jkummerow@chromium.org
0a6493b5a8
Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
...
BUG=None
TEST=Included in CL.
Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 18:03:38 +00:00
rossberg@chromium.org
cd585f26ab
Introduce global contexts to represent lexical global scope(s).
...
They are yet unused; actual allocation of global lexical bindings in these contexts is implemented in a separate follow-up CL.
R=svenpanne@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10876067
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 09:40:26 +00:00
yangguo@chromium.org
89cd0677dc
Add check to external string resource.
...
Extensions are a source of external strings where we don't perform check yet.
R=ulan@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10878025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-24 13:01:52 +00:00
svenpanne@chromium.org
b10d5d7f08
Deoptimization support for accessors.
...
Highlights of this CL:
* Introduced a new opcode in the deoptimizer for a setter stub frame.
* Added a global setter stub for returning after deoptimizing a setter.
* We do not need special deopt support for getters, although the getter stub creates an internal frame. The normal machinery works just right for this case, although we generate a stack that can never occur during normal fullcode execution. If this hurts us one day, we can parameterize and reuse the setter deopt machinery.
Review URL: https://chromiumcodereview.appspot.com/10855098
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 10:43:32 +00:00
yangguo@chromium.org
4d1d1eb53e
Fix building with GCC 3.x
...
R=yangguo@chromium.org
BUG=v8:2016, v8:2017
TEST=
Review URL: https://chromiumcodereview.appspot.com/10823034
Patch from James Pike <g00gle@chilon.net>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 09:18:09 +00:00
yangguo@chromium.org
6b489d9753
Improve String::WriteAscii and add PRESERVE_ASCII_NULL option.
...
The PRESERVE_ASCII_NULL option prevents WriteAscii from converting
\0 to white space.
R=verwaest@chromium.org
BUG=v8:2252
TEST=test-api/StringWrite
Review URL: https://chromiumcodereview.appspot.com/10810056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 14:22:46 +00:00
danno@chromium.org
43d0ed048d
Implements a new API to set a function entry hook for profiling.
...
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.
Committed: https://code.google.com/p/v8/source/detail?r=12069
Committed: https://code.google.com/p/v8/source/detail?r=12083
Review URL: https://chromiumcodereview.appspot.com/10706002
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 15:18:15 +00:00
danno@chromium.org
b1530257ab
Revert 12083: Implements a new API to set a function entry hook for profiling.
...
TBR=mstarzinger@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10695206
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 16:33:27 +00:00
danno@chromium.org
5c8c4bec46
Implements a new API to set a function entry hook for profiling.
...
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.
Committed: https://code.google.com/p/v8/source/detail?r=12069
Review URL: https://chromiumcodereview.appspot.com/10706002
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 16:18:37 +00:00
danno@chromium.org
30569cba9b
Revert 12069: Implements a new API to set a function entry hook for profiling
...
Reverted due to waterfall failures
TBR=mstarzinger@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10704189
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:59:50 +00:00
danno@chromium.org
d6edbdd436
Implements a new API to set a function entry hook for profiling.
...
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.
Review URL: https://chromiumcodereview.appspot.com/10706002
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:42:39 +00:00
yangguo@chromium.org
791632cf06
Fix compilation when disabling debugger support.
...
Based on a patch by Remi Duraffort <remi.duraffort@st.com>: http://codereview.chromium.org/10702093/
R=mstarzinger@chromium.org
BUG=
TEST=build with debuggersupport=off
Review URL: https://chromiumcodereview.appspot.com/10697085
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-05 16:23:14 +00:00
rossberg@chromium.org
680797234c
Further extend TypedArray support in d8:
...
- Add copy constructors.
- Add subarray methods.
- Make instanceof and constructor property work.
- Rename PixelArray to Uint8ClampedArray.
Also fix broken definition of assertInstanceof in MJSUnit test harness.
R=mstarzinger@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10558005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-28 16:29:53 +00:00
mstarzinger@chromium.org
81e8aa0016
Implement implicit instance checks for API accessors.
...
This allows to specify a constructor against which an implicit instance
check is performed for API accessors. If the receiver is incompatible,
an implicit TypeError is thrown and no callback is invoked.
R=svenpanne@chromium.org
BUG=v8:2075
TEST=cctest/test-api/InstanceCheckOn[*]
Review URL: https://chromiumcodereview.appspot.com/10442129
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-08 07:45:11 +00:00
yangguo@chromium.org
70408d49b1
Define V8_EXPORT to nothing for clients of v8.
...
This is to make sure that inline functions are only exported by
libv8.so and not also by all clients. This is the v8 version of
https://chromiumcodereview.appspot.com/10386108/
This CL depends on http://codereview.chromium.org/10310156/ landing
first.
BUG=chromium:90078
Review URL: https://chromiumcodereview.appspot.com/10399036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-18 09:52:09 +00:00
mstarzinger@chromium.org
6aeed46180
Make String::Empty inlineable.
...
R=svenpanne@chromium.org
TEST=cctest/test-api/StringEmpty
Review URL: https://chromiumcodereview.appspot.com/10199019
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-25 08:45:45 +00:00
mstarzinger@chromium.org
c25a92d76b
Make Isolate::GetData and Isolate::SetData inlineable.
...
R=svenpanne@chromium.org
TEST=cctest/test-api/IsolateEmbedderData
Review URL: https://chromiumcodereview.appspot.com/10196013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-24 14:37:53 +00:00
mstarzinger@chromium.org
5113cc1bbc
Make static API getters inlineable again.
...
This relands r11376 with minor fixes for Windows where offsets are
slightly different from Linux for unaligned fields.
R=svenpanne@chromium.org
TEST=cctest/test-api/StaticGetters
Review URL: https://chromiumcodereview.appspot.com/10176004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-23 15:09:59 +00:00
mstarzinger@chromium.org
0f590eb45f
Revert r11376 and r11379 due to compile failures on Windows.
...
TBR=jkummerow@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10116030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-18 17:49:53 +00:00
mstarzinger@chromium.org
841158fb6a
Fix presubmit failure in r11376.
...
R=jkummerow@chromium.org
TEST=cctest/test-api/StaticGetters[AfterDeath]
Review URL: https://chromiumcodereview.appspot.com/10021057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-18 17:18:56 +00:00
mstarzinger@chromium.org
3b3e701a27
Make static API getters inlineable.
...
R=danno@chromium.org
TEST=cctest/test-api/StaticGetters[AfterDeath]
Review URL: https://chromiumcodereview.appspot.com/10116024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-18 16:07:08 +00:00
mstarzinger@chromium.org
a13e41f328
Make Value::IsUndefined and Value::IsNull inlineable.
...
R=danno@chromium.org
TEST=cctest/test-api
Review URL: https://chromiumcodereview.appspot.com/10091035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-18 15:51:34 +00:00
loislo@chromium.org
b2024c531c
Push heap stats as HeapStatsUpdate struct instead of raw array of uint32_t values.
...
We are pushing stats data as a raw array of uint32_t values at the moment.
It makes tricky the process of updating the API between v8 and WebKit.
BUG=none
TEST=HeapSnapshotObjectsStats
Review URL: https://chromiumcodereview.appspot.com/10110001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-17 13:10:17 +00:00
jkummerow@chromium.org
f0ea13846d
Provide empty default implementation of OutputStream::WriteUint32Chunk to make Webkit V8 bindings compile
...
Review URL: https://chromiumcodereview.appspot.com/10084001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-13 10:57:17 +00:00
mstarzinger@chromium.org
20777bf0c5
Fix several ancient presubmit failures.
...
R=jkummerow@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10038046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-13 09:58:29 +00:00
mstarzinger@chromium.org
2f732c2728
Add isolate accessor to AccessorInfo and Arguments.
...
This passes the isolate through to API callback functions so that it is
available through AccessorInfo and Arguments. This allows bindings to
avoid unnecessary TLS lookups to retrieve the current isolate.
R=danno@chromium.org
TEST=cctest/test-api,cctest/test-accessors
Review URL: https://chromiumcodereview.appspot.com/10069050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-13 09:38:00 +00:00
loislo@chromium.org
d1f83dd95a
This patch is introducing a way to grab heap stats.
...
The idea is to monitor the heap regulary and track each object in the heap.
With this data we will be able do draw heap usage diagram.
Where X is time and Y is the number of objects.
BUG=none
TEST=HeapSnapshotObjectsStats
Review URL: https://chromiumcodereview.appspot.com/10049002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-13 08:52:25 +00:00
erik.corry@gmail.com
a3629daa2c
Fix external allocated memory accounting to use 64 bit values on
...
64 bit architectures.
Review URL: https://chromiumcodereview.appspot.com/10020032
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 09:23:57 +00:00
erik.corry@gmail.com
bcd0fd00e3
Add API call that identifies strings that are guaranteed
...
only to contain ASCII characters.
Review URL: https://chromiumcodereview.appspot.com/9724022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-19 09:51:36 +00:00
rossberg@chromium.org
8604da7f06
New class for Date objects: caches individual date components.
...
First step, cache slots not used yet.
R=ulan@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9117034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 11:11:55 +00:00
vegorov@chromium.org
c112fdc398
Adds a new API where the host can supply a callback function. The callback function can resolve the location of a return address on stack to the location where a return-address rewriting profiler stashed the original return address.
...
Review URL: https://chromiumcodereview.appspot.com/9401019
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 15:15:53 +00:00
mstarzinger@chromium.org
36a91e30f7
Fix redefining of attributes on aliased arguments.
...
This allows elements of the non-strict arguments object to be redefined
with custom attributes and still maintain an alias into the context.
Such a slow alias is maintained by placing a special marker into the
dictionary backing store of the arguments object.
R=rossberg@chromium.org
BUG=v8:1772
TEST=test262,mjsunit/object-define-property
Review URL: https://chromiumcodereview.appspot.com/9460004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-24 14:34:01 +00:00
rossberg@chromium.org
1336b913d0
Make built-ins strict mode conforming, and support a --use-strict flag.
...
* Turned all uses of 'const' into 'var'.
* Turned all uses of local 'function' into 'var'.
* Added a couple of missing toplevel 'var' declarations.
One consequence is that the properties on the builtin object are no longer
non-writable, and I had to adapt one test. Is that a problem?
Unfortunately, we cannot actually switch the library scripts to strict mode
by default, because that makes observable things like poisoned .caller properties
for library functions.
Also removed dead flag code in Compiler::Compile.
R=yangguo@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9415010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 13:48:24 +00:00
jkummerow@chromium.org
0177aa62da
Count ICs that have type information.
...
Hidden behind --type-info-threshold=X flag, usage dependent on experimental profiler.
Review URL: https://chromiumcodereview.appspot.com/9403009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 12:57:23 +00:00
yurys@chromium.org
882ede3053
Add a getter for value set with AllowCodeGenerationFromStrings
...
Review URL: https://chromiumcodereview.appspot.com/9223016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-01 12:58:34 +00:00
yurys@chromium.org
09ff5c4c44
Provide access to function inferred name in v8 public API
...
Review URL: https://chromiumcodereview.appspot.com/9146039
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 12:45:54 +00:00
erik.corry@gmail.com
b0607b7127
Fix bug 542, misleading documentation of v8::Locker.
...
Review URL: https://chromiumcodereview.appspot.com/9160028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 13:07:21 +00:00
yurys@chromium.org
ebb75c23a1
Provide a way for iterating through all external strings referenced from the JS heap
...
Review URL: http://codereview.chromium.org/9139018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 15:14:45 +00:00
svenpanne@chromium.org
6997dbe13e
Fixed AccessorPair handling
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 16:12:16 +00:00
yangguo@chromium.org
d9f7cf819c
Implement callback when script finishes running in V8 API.
...
TEST=test-api/LeaveScriptCallback
Review URL: http://codereview.chromium.org/8937003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 08:48:35 +00:00