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

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp

Issue 2630453004: Increase heap limit for DevTools isolate. (Closed)
Patch Set: Created 3 years, 11 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
« 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 /* 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl() { 60 WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl() {
61 if (m_devtoolsHost) 61 if (m_devtoolsHost)
62 m_devtoolsHost->disconnectClient(); 62 m_devtoolsHost->disconnectClient();
63 } 63 }
64 64
65 void WebDevToolsFrontendImpl::didClearWindowObject(WebLocalFrameImpl* frame) { 65 void WebDevToolsFrontendImpl::didClearWindowObject(WebLocalFrameImpl* frame) {
66 if (m_webFrame == frame) { 66 if (m_webFrame == frame) {
67 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 67 v8::Isolate* isolate = v8::Isolate::GetCurrent();
68 // Use higher limit for DevTools isolate so that it does not OOM when
69 // taking large heap snapshots.
70 isolate->IncreaseHeapLimitForDebugging();
alph 2017/01/12 17:03:22 I wonder why it helps. Most of the heap snapshot d
68 ScriptState* scriptState = ScriptState::forMainWorld(m_webFrame->frame()); 71 ScriptState* scriptState = ScriptState::forMainWorld(m_webFrame->frame());
69 DCHECK(scriptState); 72 DCHECK(scriptState);
70 ScriptState::Scope scope(scriptState); 73 ScriptState::Scope scope(scriptState);
71 74
72 if (m_devtoolsHost) 75 if (m_devtoolsHost)
73 m_devtoolsHost->disconnectClient(); 76 m_devtoolsHost->disconnectClient();
74 m_devtoolsHost = DevToolsHost::create(this, m_webFrame->frame()); 77 m_devtoolsHost = DevToolsHost::create(this, m_webFrame->frame());
75 v8::Local<v8::Object> global = scriptState->context()->Global(); 78 v8::Local<v8::Object> global = scriptState->context()->Global();
76 v8::Local<v8::Value> devtoolsHostObj = 79 v8::Local<v8::Value> devtoolsHostObj =
77 ToV8(m_devtoolsHost.get(), global, scriptState->isolate()); 80 ToV8(m_devtoolsHost.get(), global, scriptState->isolate());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 ->viewImpl() 116 ->viewImpl()
114 ->showContextMenuAtPoint(x, y, menuProvider); 117 ->showContextMenuAtPoint(x, y, menuProvider);
115 } 118 }
116 119
117 void WebDevToolsFrontendImpl::setInjectedScriptForOrigin(const String& origin, 120 void WebDevToolsFrontendImpl::setInjectedScriptForOrigin(const String& origin,
118 const String& source) { 121 const String& source) {
119 m_injectedScriptForOrigin.set(origin, source); 122 m_injectedScriptForOrigin.set(origin, source);
120 } 123 }
121 124
122 } // namespace blink 125 } // namespace blink
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