Expose APIs for detecting boxed primitives, native errors and Math.
authorvegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 14 Jul 2011 11:00:04 +0000 (11:00 +0000)
committervegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 14 Jul 2011 11:00:04 +0000 (11:00 +0000)
commit615add84639fe78656fb2741b75f4a77a32ad321
tree43e553673e144697ded76dfe6e146d3bc4d6000a
parent3cbd1a1d3061a6c8b60af9de2e1cc67b0bb6b777
Expose APIs for detecting boxed primitives, native errors and Math.

While implementing structured clone I found that I need support
for detecting and creating objects using the builtin Number, String
and Boolean constructors; this CL adds this support. I also need
to be able to detect entities of "native object type (e.g., Error)",
hence the new IsNativeError() calls.

(ref: http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data)

Patch by Luke Zarko.

Review URL: http://codereview.chromium.org/7344013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
include/v8.h
src/api.cc
test/cctest/test-api.cc