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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 { | 199 { |
200 m_client->removeFileSystem(fileSystemPath); | 200 m_client->removeFileSystem(fileSystemPath); |
201 } | 201 } |
202 | 202 |
203 bool InspectorFrontendClientImpl::isUnderTest() | 203 bool InspectorFrontendClientImpl::isUnderTest() |
204 { | 204 { |
205 return m_client->isUnderTest(); | 205 return m_client->isUnderTest(); |
206 } | 206 } |
207 | 207 |
208 } // namespace WebKit | 208 } // namespace WebKit |
OLD | NEW |