OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 static void assertV8RecursionScope() | 47 static void assertV8RecursionScope() |
48 { | 48 { |
49 ASSERT(V8RecursionScope::properlyUsed(v8::Isolate::GetCurrent())); | 49 ASSERT(V8RecursionScope::properlyUsed(v8::Isolate::GetCurrent())); |
50 } | 50 } |
51 #endif | 51 #endif |
52 | 52 |
53 static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeat
ure feature) | 53 static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeat
ure feature) |
54 { | 54 { |
55 switch (feature) { | 55 switch (feature) { |
56 case v8::Isolate::kUseAsm: | 56 case v8::Isolate::kUseAsm: |
57 UseCounter::count(currentExecutionContext(isolate), UseCounter::UseAsm); | 57 UseCounter::count(callingExecutionContext(isolate), UseCounter::UseAsm); |
| 58 break; |
| 59 case v8::Isolate::kBreakIterator: |
| 60 UseCounter::count(callingExecutionContext(isolate), UseCounter::BreakIte
rator); |
58 break; | 61 break; |
59 default: | 62 default: |
60 // V8 may be a newer version that has some use counters we don't know | 63 ASSERT_NOT_REACHED(); |
61 // about yet. FIXME: Add support for v8::Isolate::kBreakIterator and | |
62 // UseCounter::BreakIterator. | |
63 break; | 64 break; |
64 } | 65 } |
65 } | 66 } |
66 | 67 |
67 V8PerIsolateData::V8PerIsolateData() | 68 V8PerIsolateData::V8PerIsolateData() |
68 : m_destructionPending(false) | 69 : m_destructionPending(false) |
69 , m_isolateHolder(adoptPtr(new gin::IsolateHolder())) | 70 , m_isolateHolder(adoptPtr(new gin::IsolateHolder())) |
70 , m_stringCache(adoptPtr(new StringCache(isolate()))) | 71 , m_stringCache(adoptPtr(new StringCache(isolate()))) |
71 , m_hiddenValue(adoptPtr(new V8HiddenValue())) | 72 , m_hiddenValue(adoptPtr(new V8HiddenValue())) |
72 , m_constructorMode(ConstructorMode::CreateNewObject) | 73 , m_constructorMode(ConstructorMode::CreateNewObject) |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 } | 249 } |
249 | 250 |
250 IDBPendingTransactionMonitor* V8PerIsolateData::ensureIDBPendingTransactionMonit
or() | 251 IDBPendingTransactionMonitor* V8PerIsolateData::ensureIDBPendingTransactionMonit
or() |
251 { | 252 { |
252 if (!m_idbPendingTransactionMonitor) | 253 if (!m_idbPendingTransactionMonitor) |
253 m_idbPendingTransactionMonitor = adoptPtr(new IDBPendingTransactionMonit
or()); | 254 m_idbPendingTransactionMonitor = adoptPtr(new IDBPendingTransactionMonit
or()); |
254 return m_idbPendingTransactionMonitor.get(); | 255 return m_idbPendingTransactionMonitor.get(); |
255 } | 256 } |
256 | 257 |
257 } // namespace blink | 258 } // namespace blink |
OLD | NEW |