| OLD | NEW |
| 1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
| 2 // All rights reserved. | 2 // 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 are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2299 // it won't be able to reach the outer window via its global object. | 2299 // it won't be able to reach the outer window via its global object. |
| 2300 void V8Proxy::InitContextIfNeeded() | 2300 void V8Proxy::InitContextIfNeeded() |
| 2301 { | 2301 { |
| 2302 // Bail out if the context has already been initialized. | 2302 // Bail out if the context has already been initialized. |
| 2303 if (!m_context.IsEmpty()) | 2303 if (!m_context.IsEmpty()) |
| 2304 return; | 2304 return; |
| 2305 | 2305 |
| 2306 // Install counters handler with V8. | 2306 // Install counters handler with V8. |
| 2307 static bool v8_counters_initialized = false; | 2307 static bool v8_counters_initialized = false; |
| 2308 if (!v8_counters_initialized) { | 2308 if (!v8_counters_initialized) { |
| 2309 ChromiumBridge::initV8CounterFunction(); | 2309 // TODO(eroman): |
| 2310 //ChromiumBridge::initV8CounterFunction(); |
| 2310 v8_counters_initialized = true; | 2311 v8_counters_initialized = true; |
| 2311 } | 2312 } |
| 2312 | 2313 |
| 2313 // Setup the security handlers and message listener. This only has | 2314 // Setup the security handlers and message listener. This only has |
| 2314 // to be done once. | 2315 // to be done once. |
| 2315 static bool v8_initialized = false; | 2316 static bool v8_initialized = false; |
| 2316 if (!v8_initialized) { | 2317 if (!v8_initialized) { |
| 2317 // Tells V8 not to call the default OOM handler, binding code | 2318 // Tells V8 not to call the default OOM handler, binding code |
| 2318 // will handle it. | 2319 // will handle it. |
| 2319 v8::V8::IgnoreOutOfMemoryException(); | 2320 v8::V8::IgnoreOutOfMemoryException(); |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3525 } | 3526 } |
| 3526 return ToWebCoreString(v8::Debug::Call(frame_source_name)); | 3527 return ToWebCoreString(v8::Debug::Call(frame_source_name)); |
| 3527 } | 3528 } |
| 3528 | 3529 |
| 3529 void V8Proxy::RegisterExtension(v8::Extension* extension) { | 3530 void V8Proxy::RegisterExtension(v8::Extension* extension) { |
| 3530 v8::RegisterExtension(extension); | 3531 v8::RegisterExtension(extension); |
| 3531 m_extensions.push_back(extension); | 3532 m_extensions.push_back(extension); |
| 3532 } | 3533 } |
| 3533 | 3534 |
| 3534 } // namespace WebCore | 3535 } // namespace WebCore |
| OLD | NEW |