| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 InspectorFrontendClientImpl::~InspectorFrontendClientImpl() | 57 InspectorFrontendClientImpl::~InspectorFrontendClientImpl() |
| 58 { | 58 { |
| 59 if (m_frontendHost) | 59 if (m_frontendHost) |
| 60 m_frontendHost->disconnectClient(); | 60 m_frontendHost->disconnectClient(); |
| 61 m_client = 0; | 61 m_client = 0; |
| 62 } | 62 } |
| 63 | 63 |
| 64 void InspectorFrontendClientImpl::windowObjectCleared() | 64 void InspectorFrontendClientImpl::windowObjectCleared() |
| 65 { | 65 { |
| 66 v8::HandleScope handleScope; | 66 v8::HandleScope handleScope(v8::Isolate::GetCurrent()); |
| 67 v8::Handle<v8::Context> frameContext = m_frontendPage->mainFrame() ? m_front
endPage->mainFrame()->script()->currentWorldContext() : v8::Local<v8::Context>()
; | 67 v8::Handle<v8::Context> frameContext = m_frontendPage->mainFrame() ? m_front
endPage->mainFrame()->script()->currentWorldContext() : v8::Local<v8::Context>()
; |
| 68 v8::Context::Scope contextScope(frameContext); | 68 v8::Context::Scope contextScope(frameContext); |
| 69 | 69 |
| 70 if (m_frontendHost) | 70 if (m_frontendHost) |
| 71 m_frontendHost->disconnectClient(); | 71 m_frontendHost->disconnectClient(); |
| 72 m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage); | 72 m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage); |
| 73 v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get(), v8::Handl
e<v8::Object>(), frameContext->GetIsolate()); | 73 v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get(), v8::Handl
e<v8::Object>(), frameContext->GetIsolate()); |
| 74 v8::Handle<v8::Object> global = frameContext->Global(); | 74 v8::Handle<v8::Object> global = frameContext->Global(); |
| 75 | 75 |
| 76 global->Set(v8::String::New("InspectorFrontendHost"), frontendHostObj); | 76 global->Set(v8::String::New("InspectorFrontendHost"), frontendHostObj); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 { | 161 { |
| 162 m_client->removeFileSystem(fileSystemPath); | 162 m_client->removeFileSystem(fileSystemPath); |
| 163 } | 163 } |
| 164 | 164 |
| 165 bool InspectorFrontendClientImpl::isUnderTest() | 165 bool InspectorFrontendClientImpl::isUnderTest() |
| 166 { | 166 { |
| 167 return m_client->isUnderTest(); | 167 return m_client->isUnderTest(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace WebKit | 170 } // namespace WebKit |
| OLD | NEW |