Make (some) functions called from builtin functions use the callback's global as...
authorlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 26 Aug 2011 13:53:00 +0000 (13:53 +0000)
committerlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 26 Aug 2011 13:53:00 +0000 (13:53 +0000)
commitcd3588d5823dcfa2575e6100a1d26ae48c913f56
tree3b784b468684bd713198a9a2f2cc2fafe55de7fc
parentdaf8135ba68e8b73c7dd91f79a8242b2ca81b0e3
Make (some) functions called from builtin functions use the callback's global as receiver.

Changes GetGlobalReceiver() to GetDefaultReceiver(func) that returns undefined
for strict and native functions, and the function's context's global proxy
for "normal" functions.

BUG=v8:1547
TEST=cctest/api-test/ForeignFunctionReceiver

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/full-codegen-arm.cc
src/array.js
src/hydrogen.cc
src/ia32/full-codegen-ia32.cc
src/mips/full-codegen-mips.cc
src/runtime.cc
src/runtime.h
src/string.js
src/x64/full-codegen-x64.cc
test/cctest/test-api.cc