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

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

Issue 44453002: Remove HistogramSupport abstraction layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "bindings/v8/V8PerContextData.h" 47 #include "bindings/v8/V8PerContextData.h"
48 #include "core/html/HTMLCollection.h" 48 #include "core/html/HTMLCollection.h"
49 #include "core/html/HTMLIFrameElement.h" 49 #include "core/html/HTMLIFrameElement.h"
50 #include "core/inspector/InspectorInstrumentation.h" 50 #include "core/inspector/InspectorInstrumentation.h"
51 #include "core/loader/DocumentLoader.h" 51 #include "core/loader/DocumentLoader.h"
52 #include "core/loader/FrameLoader.h" 52 #include "core/loader/FrameLoader.h"
53 #include "core/loader/FrameLoaderClient.h" 53 #include "core/loader/FrameLoaderClient.h"
54 #include "core/frame/ContentSecurityPolicy.h" 54 #include "core/frame/ContentSecurityPolicy.h"
55 #include "core/frame/Frame.h" 55 #include "core/frame/Frame.h"
56 #include "core/page/Page.h" 56 #include "core/page/Page.h"
57 #include "core/platform/HistogramSupport.h"
58 #include "platform/TraceEvent.h" 57 #include "platform/TraceEvent.h"
58 #include "public/platform/Platform.h"
59 #include "weborigin/SecurityOrigin.h" 59 #include "weborigin/SecurityOrigin.h"
60 #include "wtf/Assertions.h" 60 #include "wtf/Assertions.h"
61 #include "wtf/OwnPtr.h" 61 #include "wtf/OwnPtr.h"
62 #include "wtf/StringExtras.h" 62 #include "wtf/StringExtras.h"
63 #include "wtf/text/CString.h" 63 #include "wtf/text/CString.h"
64 #include <algorithm> 64 #include <algorithm>
65 #include <utility> 65 #include <utility>
66 #include <v8-debug.h> 66 #include <v8-debug.h>
67 #include <v8.h> 67 #include <v8.h>
68 68
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 v8::ExtensionConfiguration extensionConfiguration(index, extensionNames.get( )); 291 v8::ExtensionConfiguration extensionConfiguration(index, extensionNames.get( ));
292 292
293 v8::HandleScope handleScope(m_isolate); 293 v8::HandleScope handleScope(m_isolate);
294 m_context.set(m_isolate, v8::Context::New(m_isolate, &extensionConfiguration , globalTemplate, m_global.newLocal(m_isolate))); 294 m_context.set(m_isolate, v8::Context::New(m_isolate, &extensionConfiguration , globalTemplate, m_global.newLocal(m_isolate)));
295 295
296 double contextCreationDurationInMilliseconds = (currentTime() - contextCreat ionStartInSeconds) * 1000; 296 double contextCreationDurationInMilliseconds = (currentTime() - contextCreat ionStartInSeconds) * 1000;
297 const char* histogramName = "WebCore.V8WindowShell.createContext.MainWorld"; 297 const char* histogramName = "WebCore.V8WindowShell.createContext.MainWorld";
298 if (!m_world->isMainWorld()) 298 if (!m_world->isMainWorld())
299 histogramName = "WebCore.V8WindowShell.createContext.IsolatedWorld"; 299 histogramName = "WebCore.V8WindowShell.createContext.IsolatedWorld";
300 HistogramSupport::histogramCustomCounts(histogramName, contextCreationDurati onInMilliseconds, 0, 10000, 50); 300 WebKit::Platform::current()->histogramCustomCounts(histogramName, contextCre ationDurationInMilliseconds, 0, 10000, 50);
301 } 301 }
302 302
303 bool V8WindowShell::installDOMWindow() 303 bool V8WindowShell::installDOMWindow()
304 { 304 {
305 DOMWrapperWorld::setInitializingWindow(true); 305 DOMWrapperWorld::setInitializingWindow(true);
306 DOMWindow* window = m_frame->domWindow(); 306 DOMWindow* window = m_frame->domWindow();
307 v8::Local<v8::Object> windowWrapper = V8ObjectConstructor::newInstance(V8Per ContextData::from(m_context.newLocal(m_isolate))->constructorForType(&V8Window:: wrapperTypeInfo)); 307 v8::Local<v8::Object> windowWrapper = V8ObjectConstructor::newInstance(V8Per ContextData::from(m_context.newLocal(m_isolate))->constructorForType(&V8Window:: wrapperTypeInfo));
308 if (windowWrapper.IsEmpty()) 308 if (windowWrapper.IsEmpty())
309 return false; 309 return false;
310 310
(...skipping 191 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/ScriptController.cpp ('k') | Source/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698