Revert Add a use counter for Intl.v8BreakIterator https://codereview.chromium.org/619913002/

This is due to breakage on the ASAN memory leak bot, possibly due to
pre-existing leaks in v8BreakIterator().

R=ishell@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 548428d9
...@@ -4528,7 +4528,6 @@ class V8_EXPORT Isolate { ...@@ -4528,7 +4528,6 @@ class V8_EXPORT Isolate {
*/ */
enum UseCounterFeature { enum UseCounterFeature {
kUseAsm = 0, kUseAsm = 0,
kBreakIterator = 1,
kUseCounterFeatureCount // This enum value must be last. kUseCounterFeatureCount // This enum value must be last.
}; };
......
...@@ -631,8 +631,6 @@ icu::BreakIterator* CreateICUBreakIterator( ...@@ -631,8 +631,6 @@ icu::BreakIterator* CreateICUBreakIterator(
return NULL; return NULL;
} }
isolate->CountUsage(v8::Isolate::UseCounterFeature::kBreakIterator);
return break_iterator; return break_iterator;
} }
......
...@@ -1292,35 +1292,6 @@ TEST(RobustSubStringStub) { ...@@ -1292,35 +1292,6 @@ TEST(RobustSubStringStub) {
} }
namespace {
int* global_use_counts = NULL;
void MockUseCounterCallback(v8::Isolate* isolate,
v8::Isolate::UseCounterFeature feature) {
++global_use_counts[feature];
}
}
TEST(CountBreakIterator) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
LocalContext context;
int use_counts[v8::Isolate::kUseCounterFeatureCount] = {};
global_use_counts = use_counts;
CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback);
CHECK_EQ(0, use_counts[v8::Isolate::kBreakIterator]);
v8::Local<v8::Value> result = CompileRun(
"var iterator = Intl.v8BreakIterator(['en']);"
"iterator.adoptText('Now is the time');"
"iterator.next();"
"iterator.next();");
CHECK(result->IsNumber());
CHECK_EQ(1, use_counts[v8::Isolate::kBreakIterator]);
}
TEST(StringReplaceAtomTwoByteResult) { TEST(StringReplaceAtomTwoByteResult) {
CcTest::InitializeVM(); CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate()); v8::HandleScope scope(CcTest::isolate());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment