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

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

Issue 15861022: Build WTF as dll in component build (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "core/platform/Widget.h" 74 #include "core/platform/Widget.h"
75 #include "core/platform/chromium/TraceEvent.h" 75 #include "core/platform/chromium/TraceEvent.h"
76 #include "core/plugins/PluginView.h" 76 #include "core/plugins/PluginView.h"
77 #include "weborigin/SecurityOrigin.h" 77 #include "weborigin/SecurityOrigin.h"
78 #include "wtf/CurrentTime.h" 78 #include "wtf/CurrentTime.h"
79 #include "wtf/StdLibExtras.h" 79 #include "wtf/StdLibExtras.h"
80 #include "wtf/StringExtras.h" 80 #include "wtf/StringExtras.h"
81 #include "wtf/text/CString.h" 81 #include "wtf/text/CString.h"
82 #include "wtf/text/StringBuilder.h" 82 #include "wtf/text/StringBuilder.h"
83 #include "wtf/text/TextPosition.h" 83 #include "wtf/text/TextPosition.h"
84 #include <public/Platform.h>
84 85
85 namespace WebCore { 86 namespace WebCore {
86 87
88 static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* con text)
89 {
90 WebKit::Platform::current()->callOnMainThread(function, context);
91 }
92
87 void ScriptController::initializeThreading() 93 void ScriptController::initializeThreading()
88 { 94 {
89 static bool initializedThreading = false; 95 static bool initializedThreading = false;
90 if (!initializedThreading) { 96 if (!initializedThreading) {
91 WTF::initializeThreading(); 97 WTF::initializeThreading();
92 WTF::initializeMainThread(); 98 WTF::initializeMainThread(callOnMainThreadFunction);
darin (slow to review) 2013/05/25 21:42:43 Why does ScriptController::initializeThreading exi
jamesr 2013/05/26 01:09:10 The only way I can think that this would make sens
93 initializedThreading = true; 99 initializedThreading = true;
94 } 100 }
95 } 101 }
96 102
97 bool ScriptController::canAccessFromCurrentOrigin(Frame *frame) 103 bool ScriptController::canAccessFromCurrentOrigin(Frame *frame)
98 { 104 {
99 return !v8::Context::InContext() || BindingSecurity::shouldAllowAccessToFram e(frame); 105 return !v8::Context::InContext() || BindingSecurity::shouldAllowAccessToFram e(frame);
100 } 106 }
101 107
102 ScriptController::ScriptController(Frame* frame) 108 ScriptController::ScriptController(Frame* frame)
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 v8Results = evaluateHandleScope.Close(resultArray); 730 v8Results = evaluateHandleScope.Close(resultArray);
725 } 731 }
726 732
727 if (results && !v8Results.IsEmpty()) { 733 if (results && !v8Results.IsEmpty()) {
728 for (size_t i = 0; i < v8Results->Length(); ++i) 734 for (size_t i = 0; i < v8Results->Length(); ++i)
729 results->append(ScriptValue(v8Results->Get(i))); 735 results->append(ScriptValue(v8Results->Get(i)));
730 } 736 }
731 } 737 }
732 738
733 } // namespace WebCore 739 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698