Remove a bunch of Isolate::UncheckedCurrent calls
authorjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Jul 2014 07:19:46 +0000 (07:19 +0000)
committerjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Jul 2014 07:19:46 +0000 (07:19 +0000)
commit6d5d4b44b512eaa982adc1f8d03e9c649b5b08d9
tree95a99275a96abbb5ccacae0f6f8dfb418136ab17
parent29667ff172dc7874365d4f260a592d580f61d3b0
Remove a bunch of Isolate::UncheckedCurrent calls

The callbacks are per isolate, so we shouldn't get the isolate implicitly
from TLS. Also, we shouldn't allow calls to these methods prior to
initializing the respective isolate (and silently ignore them).

Esp. add a per-isolate API to set the stats counter callbacks and
make it possible to set the stats counter callback after the isolate
was touched.

Embedders should use e.g. isolate->SetCounterFunction(callback) instead
of v8::V8::SetCounterFunction(callback).

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
include/v8.h
src/api.cc
src/counters.cc
src/counters.h
src/d8.cc
src/d8.h
src/isolate.cc
test/cctest/test-api.cc