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

Side by Side Diff: Source/bindings/v8/PageScriptDebugServer.cpp

Issue 168583005: Remove DOMWrapperWorld::isIsolatedWorldId and DOMWrapperWorld::context (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « Source/bindings/v8/DOMWrapperWorld.cpp ('k') | Source/bindings/v8/ScriptPreprocessor.h » ('j') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 { 241 {
242 ASSERT(frame); 242 ASSERT(frame);
243 243
244 if (!m_preprocessorSourceCode || !frame->page() || isCreatingPreprocessor) 244 if (!m_preprocessorSourceCode || !frame->page() || isCreatingPreprocessor)
245 return false; 245 return false;
246 246
247 // We delay the creation of the preprocessor until just before the first JS from the 247 // We delay the creation of the preprocessor until just before the first JS from the
248 // Web page to ensure that the debugger's console initialization code has co mpleted. 248 // Web page to ensure that the debugger's console initialization code has co mpleted.
249 if (!m_scriptPreprocessor) { 249 if (!m_scriptPreprocessor) {
250 TemporaryChange<bool> isPreprocessing(isCreatingPreprocessor, true); 250 TemporaryChange<bool> isPreprocessing(isCreatingPreprocessor, true);
251 m_scriptPreprocessor = adoptPtr(new ScriptPreprocessor(*m_preprocessorSo urceCode.get(), frame->script(), frame->host()->console())); 251 m_scriptPreprocessor = adoptPtr(new ScriptPreprocessor(*m_preprocessorSo urceCode.get(), frame));
252 } 252 }
253 253
254 if (m_scriptPreprocessor->isValid()) 254 if (m_scriptPreprocessor->isValid())
255 return true; 255 return true;
256 256
257 m_scriptPreprocessor.clear(); 257 m_scriptPreprocessor.clear();
258 // Don't retry the compile if we fail one time. 258 // Don't retry the compile if we fail one time.
259 m_preprocessorSourceCode.clear(); 259 m_preprocessorSourceCode.clear();
260 return false; 260 return false;
261 } 261 }
(...skipping 10 matching lines...) Expand all
272 272
273 String PageScriptDebugServer::preprocessEventListener(Frame* frame, const String & source, const String& url, const String& functionName) 273 String PageScriptDebugServer::preprocessEventListener(Frame* frame, const String & source, const String& url, const String& functionName)
274 { 274 {
275 if (!canPreprocess(frame)) 275 if (!canPreprocess(frame))
276 return source; 276 return source;
277 277
278 return m_scriptPreprocessor->preprocessSourceCode(source, url, functionName) ; 278 return m_scriptPreprocessor->preprocessSourceCode(source, url, functionName) ;
279 } 279 }
280 280
281 } // namespace WebCore 281 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/DOMWrapperWorld.cpp ('k') | Source/bindings/v8/ScriptPreprocessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698