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

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

Issue 189513012: DOMDataStore should be cleared when shutting down worker threads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/V8PerContextData.cpp ('k') | Source/bindings/v8/WorkerScriptController.cpp » ('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) 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 if (!m_frame->loader().client()->allowScriptExtension(extensions[i]->nam e(), extensionGroup, worldId)) 279 if (!m_frame->loader().client()->allowScriptExtension(extensions[i]->nam e(), extensionGroup, worldId))
280 continue; 280 continue;
281 281
282 extensionNames[index++] = extensions[i]->name(); 282 extensionNames[index++] = extensions[i]->name();
283 } 283 }
284 v8::ExtensionConfiguration extensionConfiguration(index, extensionNames.get( )); 284 v8::ExtensionConfiguration extensionConfiguration(index, extensionNames.get( ));
285 285
286 v8::Handle<v8::Context> context = v8::Context::New(m_isolate, &extensionConf iguration, globalTemplate, m_global.newLocal(m_isolate)); 286 v8::Handle<v8::Context> context = v8::Context::New(m_isolate, &extensionConf iguration, globalTemplate, m_global.newLocal(m_isolate));
287 if (context.IsEmpty()) 287 if (context.IsEmpty())
288 return; 288 return;
289 m_perContextData = V8PerContextData::create(context, m_world.get()); 289 m_perContextData = V8PerContextData::create(context, m_world);
290 290
291 double contextCreationDurationInMilliseconds = (currentTime() - contextCreat ionStartInSeconds) * 1000; 291 double contextCreationDurationInMilliseconds = (currentTime() - contextCreat ionStartInSeconds) * 1000;
292 const char* histogramName = "WebCore.V8WindowShell.createContext.MainWorld"; 292 const char* histogramName = "WebCore.V8WindowShell.createContext.MainWorld";
293 if (!m_world->isMainWorld()) 293 if (!m_world->isMainWorld())
294 histogramName = "WebCore.V8WindowShell.createContext.IsolatedWorld"; 294 histogramName = "WebCore.V8WindowShell.createContext.IsolatedWorld";
295 blink::Platform::current()->histogramCustomCounts(histogramName, contextCrea tionDurationInMilliseconds, 0, 10000, 50); 295 blink::Platform::current()->histogramCustomCounts(histogramName, contextCrea tionDurationInMilliseconds, 0, 10000, 50);
296 } 296 }
297 297
298 static v8::Handle<v8::Object> toInnerGlobalObject(v8::Handle<v8::Context> contex t) 298 static v8::Handle<v8::Object> toInnerGlobalObject(v8::Handle<v8::Context> contex t)
299 { 299 {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (!isMainThread()) 506 if (!isMainThread())
507 return true; 507 return true;
508 // We're initializing the context, so it is not yet in a status where we can 508 // We're initializing the context, so it is not yet in a status where we can
509 // validate the context. 509 // validate the context.
510 if (contextBeingInitialized) 510 if (contextBeingInitialized)
511 return true; 511 return true;
512 return !!toDOMWindow(context); 512 return !!toDOMWindow(context);
513 } 513 }
514 514
515 } // WebCore 515 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8PerContextData.cpp ('k') | Source/bindings/v8/WorkerScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698