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 "public/platform/Platform.h" | 76 #include "public/platform/Platform.h" |
77 #include "wtf/CurrentTime.h" | 77 #include "wtf/CurrentTime.h" |
78 #include "wtf/StdLibExtras.h" | 78 #include "wtf/StdLibExtras.h" |
79 #include "wtf/StringExtras.h" | 79 #include "wtf/StringExtras.h" |
80 #include "wtf/text/CString.h" | 80 #include "wtf/text/CString.h" |
81 #include "wtf/text/StringBuilder.h" | 81 #include "wtf/text/StringBuilder.h" |
82 #include "wtf/text/TextPosition.h" | 82 #include "wtf/text/TextPosition.h" |
83 | 83 |
84 namespace blink { | 84 namespace blink { |
85 | 85 |
86 bool ScriptController::canAccessFromCurrentOrigin(LocalFrame *frame) | 86 bool ScriptController::canAccessFromCurrentOrigin(v8::Isolate* isolate, Frame* f
rame) |
87 { | 87 { |
88 if (!frame) | 88 if (!frame) |
89 return false; | 89 return false; |
90 v8::Isolate* isolate = toIsolate(frame); | |
91 return !isolate->InContext() || BindingSecurity::shouldAllowAccessToFrame(is
olate, callingDOMWindow(isolate), frame, ReportSecurityError); | 90 return !isolate->InContext() || BindingSecurity::shouldAllowAccessToFrame(is
olate, callingDOMWindow(isolate), frame, ReportSecurityError); |
92 } | 91 } |
93 | 92 |
94 ScriptController::ScriptController(LocalFrame* frame) | 93 ScriptController::ScriptController(LocalFrame* frame) |
95 : m_windowProxyManager(WindowProxyManager::create(*frame)) | 94 : m_windowProxyManager(WindowProxyManager::create(*frame)) |
96 , m_sourceURL(0) | 95 , m_sourceURL(0) |
97 , m_windowScriptNPObject(0) | 96 , m_windowScriptNPObject(0) |
98 { | 97 { |
99 } | 98 } |
100 | 99 |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 for (size_t i = 0; i < resultArray->Length(); ++i) { | 596 for (size_t i = 0; i < resultArray->Length(); ++i) { |
598 v8::Local<v8::Value> value; | 597 v8::Local<v8::Value> value; |
599 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 598 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
600 return; | 599 return; |
601 results->append(value); | 600 results->append(value); |
602 } | 601 } |
603 } | 602 } |
604 } | 603 } |
605 | 604 |
606 } // namespace blink | 605 } // namespace blink |
OLD | NEW |