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

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp

Issue 1726903002: Rename WorkerOrWorkletGlobalScope::script() to scriptController() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 static bool isAllowed(ScriptState* scriptState, ExecutionContext* executionConte xt, bool isEval) 47 static bool isAllowed(ScriptState* scriptState, ExecutionContext* executionConte xt, bool isEval)
48 { 48 {
49 if (executionContext->isDocument()) { 49 if (executionContext->isDocument()) {
50 Document* document = static_cast<Document*>(executionContext); 50 Document* document = static_cast<Document*>(executionContext);
51 if (isEval && !document->contentSecurityPolicy()->allowEval(scriptState, ContentSecurityPolicy::SendReport, ContentSecurityPolicy::WillNotThrowException )) 51 if (isEval && !document->contentSecurityPolicy()->allowEval(scriptState, ContentSecurityPolicy::SendReport, ContentSecurityPolicy::WillNotThrowException ))
52 return false; 52 return false;
53 return true; 53 return true;
54 } 54 }
55 if (executionContext->isWorkerGlobalScope()) { 55 if (executionContext->isWorkerGlobalScope()) {
56 WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(e xecutionContext); 56 WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(e xecutionContext);
57 if (!workerGlobalScope->script()) 57 if (!workerGlobalScope->scriptController())
58 return false; 58 return false;
59 ContentSecurityPolicy* policy = workerGlobalScope->contentSecurityPolicy (); 59 ContentSecurityPolicy* policy = workerGlobalScope->contentSecurityPolicy ();
60 if (isEval && policy && !policy->allowEval(scriptState, ContentSecurityP olicy::SendReport, ContentSecurityPolicy::WillNotThrowException)) 60 if (isEval && policy && !policy->allowEval(scriptState, ContentSecurityP olicy::SendReport, ContentSecurityPolicy::WillNotThrowException))
61 return false; 61 return false;
62 return true; 62 return true;
63 } 63 }
64 ASSERT_NOT_REACHED(); 64 ASSERT_NOT_REACHED();
65 return false; 65 return false;
66 } 66 }
67 67
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 void clearInterval(EventTarget& eventTarget, int timeoutID) 128 void clearInterval(EventTarget& eventTarget, int timeoutID)
129 { 129 {
130 if (ExecutionContext* context = eventTarget.executionContext()) 130 if (ExecutionContext* context = eventTarget.executionContext())
131 DOMTimer::removeByID(context, timeoutID); 131 DOMTimer::removeByID(context, timeoutID);
132 } 132 }
133 133
134 } // namespace DOMWindowTimers 134 } // namespace DOMWindowTimers
135 135
136 } // namespace blink 136 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698