| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 return false; | 65 return false; |
| 66 ContentSecurityPolicy* policy = | 66 ContentSecurityPolicy* policy = |
| 67 worker_global_scope->GetContentSecurityPolicy(); | 67 worker_global_scope->GetContentSecurityPolicy(); |
| 68 if (is_eval && policy && | 68 if (is_eval && policy && |
| 69 !policy->AllowEval(script_state, | 69 !policy->AllowEval(script_state, |
| 70 SecurityViolationReportingPolicy::kReport, | 70 SecurityViolationReportingPolicy::kReport, |
| 71 ContentSecurityPolicy::kWillNotThrowException)) | 71 ContentSecurityPolicy::kWillNotThrowException)) |
| 72 return false; | 72 return false; |
| 73 return true; | 73 return true; |
| 74 } | 74 } |
| 75 ASSERT_NOT_REACHED(); | 75 NOTREACHED(); |
| 76 return false; | 76 return false; |
| 77 } | 77 } |
| 78 | 78 |
| 79 int setTimeout(ScriptState* script_state, | 79 int setTimeout(ScriptState* script_state, |
| 80 EventTarget& event_target, | 80 EventTarget& event_target, |
| 81 const ScriptValue& handler, | 81 const ScriptValue& handler, |
| 82 int timeout, | 82 int timeout, |
| 83 const Vector<ScriptValue>& arguments) { | 83 const Vector<ScriptValue>& arguments) { |
| 84 ExecutionContext* execution_context = event_target.GetExecutionContext(); | 84 ExecutionContext* execution_context = event_target.GetExecutionContext(); |
| 85 if (!IsAllowed(script_state, execution_context, false)) | 85 if (!IsAllowed(script_state, execution_context, false)) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 152 } |
| 153 | 153 |
| 154 void clearInterval(EventTarget& event_target, int timeout_id) { | 154 void clearInterval(EventTarget& event_target, int timeout_id) { |
| 155 if (ExecutionContext* context = event_target.GetExecutionContext()) | 155 if (ExecutionContext* context = event_target.GetExecutionContext()) |
| 156 DOMTimer::RemoveByID(context, timeout_id); | 156 DOMTimer::RemoveByID(context, timeout_id); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace DOMWindowTimers | 159 } // namespace DOMWindowTimers |
| 160 | 160 |
| 161 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |