Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: webkit/glue/webdevtoolsclient_impl.cc

Issue 125246: DevTools: Fix crash on refresh. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "Document.h" 9 #include "Document.h"
10 #include "DOMWindow.h" 10 #include "DOMWindow.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // ToolsAgentNativeDelegate implementation. 60 // ToolsAgentNativeDelegate implementation.
61 virtual void DidGetResourceContent(int request_id, const String& content) { 61 virtual void DidGetResourceContent(int request_id, const String& content) {
62 if (!resource_content_requests_.contains(request_id)) { 62 if (!resource_content_requests_.contains(request_id)) {
63 NOTREACHED(); 63 NOTREACHED();
64 return; 64 return;
65 } 65 }
66 ResourceContentRequestData request = 66 ResourceContentRequestData request =
67 resource_content_requests_.take(request_id); 67 resource_content_requests_.take(request_id);
68 68
69 InspectorController* ic = frame_->frame()->page()->inspectorController(); 69 InspectorController* ic = frame_->frame()->page()->inspectorController();
70 70 if (request.frame && request.frame->attached()) {
yurys 2009/06/17 11:43:39 it should be if (request.frame.get()... also put t
71 ic->addSourceToFrame(request.mime_type, content, request.frame.get()); 71 ic->addSourceToFrame(request.mime_type, content, request.frame.get());
72 }
72 } 73 }
73 74
74 bool WaitingForResponse(int resource_id, Node* frame) { 75 bool WaitingForResponse(int resource_id, Node* frame) {
75 if (resource_content_requests_.contains(resource_id)) { 76 if (resource_content_requests_.contains(resource_id)) {
76 DCHECK(resource_content_requests_.get(resource_id).frame.get() == frame) 77 DCHECK(resource_content_requests_.get(resource_id).frame.get() == frame)
77 << "Only one frame is expected to display given resource"; 78 << "Only one frame is expected to display given resource";
78 return true; 79 return true;
79 } 80 }
80 return false; 81 return false;
81 } 82 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 v8::Handle<v8::Value> WebDevToolsClientImpl::JsGetPlatform( 314 v8::Handle<v8::Value> WebDevToolsClientImpl::JsGetPlatform(
314 const v8::Arguments& args) { 315 const v8::Arguments& args) {
315 #if defined OS_MACOSX 316 #if defined OS_MACOSX
316 return v8String("mac-leopard"); 317 return v8String("mac-leopard");
317 #elif defined OS_LINUX 318 #elif defined OS_LINUX
318 return v8String("linux"); 319 return v8String("linux");
319 #else 320 #else
320 return v8String("windows"); 321 return v8String("windows");
321 #endif 322 #endif
322 } 323 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698