| OLD | NEW |
| 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 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #include "wtf/text/CString.h" | 76 #include "wtf/text/CString.h" |
| 77 #include "wtf/text/StringBuilder.h" | 77 #include "wtf/text/StringBuilder.h" |
| 78 #include "wtf/text/TextPosition.h" | 78 #include "wtf/text/TextPosition.h" |
| 79 | 79 |
| 80 namespace blink { | 80 namespace blink { |
| 81 | 81 |
| 82 bool ScriptController::canAccessFromCurrentOrigin(v8::Isolate* isolate, Frame* f
rame) | 82 bool ScriptController::canAccessFromCurrentOrigin(v8::Isolate* isolate, Frame* f
rame) |
| 83 { | 83 { |
| 84 if (!frame) | 84 if (!frame) |
| 85 return false; | 85 return false; |
| 86 return !isolate->InContext() || BindingSecurity::shouldAllowAccessToFrame(is
olate, currentDOMWindow(isolate), frame, ReportSecurityError); | 86 DCHECK(isolate->InContext()); |
| 87 return BindingSecurity::shouldAllowAccessToFrame(isolate, currentDOMWindow(i
solate), frame, ReportSecurityError); |
| 87 } | 88 } |
| 88 | 89 |
| 89 ScriptController::ScriptController(LocalFrame* frame) | 90 ScriptController::ScriptController(LocalFrame* frame) |
| 90 : m_windowProxyManager(WindowProxyManager::create(*frame)) | 91 : m_windowProxyManager(WindowProxyManager::create(*frame)) |
| 91 { | 92 { |
| 92 } | 93 } |
| 93 | 94 |
| 94 DEFINE_TRACE(ScriptController) | 95 DEFINE_TRACE(ScriptController) |
| 95 { | 96 { |
| 96 visitor->trace(m_windowProxyManager); | 97 visitor->trace(m_windowProxyManager); |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 for (size_t i = 0; i < resultArray->Length(); ++i) { | 427 for (size_t i = 0; i < resultArray->Length(); ++i) { |
| 427 v8::Local<v8::Value> value; | 428 v8::Local<v8::Value> value; |
| 428 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 429 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
| 429 return; | 430 return; |
| 430 results->append(value); | 431 results->append(value); |
| 431 } | 432 } |
| 432 } | 433 } |
| 433 } | 434 } |
| 434 | 435 |
| 435 } // namespace blink | 436 } // namespace blink |
| OLD | NEW |