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

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

Issue 33523002: Have Frame::script() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 if (m_global.isEmpty()) { 206 if (m_global.isEmpty()) {
207 m_global.set(m_isolate, context->Global()); 207 m_global.set(m_isolate, context->Global());
208 if (m_global.isEmpty()) { 208 if (m_global.isEmpty()) {
209 disposeContext(); 209 disposeContext();
210 return false; 210 return false;
211 } 211 }
212 } 212 }
213 213
214 if (!isMainWorld) { 214 if (!isMainWorld) {
215 V8WindowShell* mainWindow = m_frame->script()->existingWindowShell(mainT hreadNormalWorld()); 215 V8WindowShell* mainWindow = m_frame->script().existingWindowShell(mainTh readNormalWorld());
216 if (mainWindow && !mainWindow->context().IsEmpty()) 216 if (mainWindow && !mainWindow->context().IsEmpty())
217 setInjectedScriptContextDebugId(context, m_frame->script()->contextD ebugId(mainWindow->context())); 217 setInjectedScriptContextDebugId(context, m_frame->script().contextDe bugId(mainWindow->context()));
218 } 218 }
219 219
220 m_perContextData = V8PerContextData::create(context); 220 m_perContextData = V8PerContextData::create(context);
221 if (!m_perContextData->init()) { 221 if (!m_perContextData->init()) {
222 disposeContext(); 222 disposeContext();
223 return false; 223 return false;
224 } 224 }
225 m_perContextData->setActivityLogger(DOMWrapperWorld::activityLogger(m_world- >worldId())); 225 m_perContextData->setActivityLogger(DOMWrapperWorld::activityLogger(m_world- >worldId()));
226 if (!installDOMWindow()) { 226 if (!installDOMWindow()) {
227 disposeContext(); 227 disposeContext();
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 void V8WindowShell::updateSecurityOrigin() 502 void V8WindowShell::updateSecurityOrigin()
503 { 503 {
504 ASSERT(m_world->isMainWorld()); 504 ASSERT(m_world->isMainWorld());
505 if (m_context.isEmpty()) 505 if (m_context.isEmpty())
506 return; 506 return;
507 v8::HandleScope handleScope(m_isolate); 507 v8::HandleScope handleScope(m_isolate);
508 setSecurityToken(); 508 setSecurityToken();
509 } 509 }
510 510
511 } // WebCore 511 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8LazyEventListener.cpp ('k') | Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698