| OLD | NEW |
| 1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 if (!origin_window->document()) | 1793 if (!origin_window->document()) |
| 1794 return true; | 1794 return true; |
| 1795 | 1795 |
| 1796 const SecurityOrigin* active_security_origin = origin_window->securityOrigin
(); | 1796 const SecurityOrigin* active_security_origin = origin_window->securityOrigin
(); |
| 1797 const SecurityOrigin* target_security_origin = target_window->securityOrigin
(); | 1797 const SecurityOrigin* target_security_origin = target_window->securityOrigin
(); |
| 1798 | 1798 |
| 1799 String ui_resource_protocol = ChromiumBridge::uiResourceProtocol(); | 1799 String ui_resource_protocol = ChromiumBridge::uiResourceProtocol(); |
| 1800 if (active_security_origin->protocol() == ui_resource_protocol) { | 1800 if (active_security_origin->protocol() == ui_resource_protocol) { |
| 1801 KURL inspector_url = ChromiumBridge::inspectorURL(); | 1801 KURL inspector_url = ChromiumBridge::inspectorURL(); |
| 1802 ASSERT(inspector_url.protocol() == ui_resource_protocol); | 1802 ASSERT(inspector_url.protocol() == ui_resource_protocol); |
| 1803 ASSERT(inspector_url.protocol().endsWith("-resource")); | |
| 1804 | 1803 |
| 1805 // The Inspector can access anything. | 1804 // The Inspector can access anything. |
| 1806 if (active_security_origin->host() == inspector_url.host()) | 1805 if (active_security_origin->host() == inspector_url.host()) |
| 1807 return true; | 1806 return true; |
| 1808 | 1807 |
| 1809 // To mitigate XSS vulnerabilities on the browser itself, UI resources | 1808 // To mitigate XSS vulnerabilities on the browser itself, UI resources |
| 1810 // besides the Inspector can't access other documents. | 1809 // besides the Inspector can't access other documents. |
| 1811 return false; | 1810 return false; |
| 1812 } | 1811 } |
| 1813 | 1812 |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3010 v8::Handle<v8::Object> global = context->Global(); | 3009 v8::Handle<v8::Object> global = context->Global(); |
| 3011 global->Set(v8::String::New(name), instance); | 3010 global->Set(v8::String::New(name), instance); |
| 3012 } | 3011 } |
| 3013 | 3012 |
| 3014 void V8Proxy::ProcessConsoleMessages() | 3013 void V8Proxy::ProcessConsoleMessages() |
| 3015 { | 3014 { |
| 3016 ConsoleMessageManager::ProcessDelayedMessages(); | 3015 ConsoleMessageManager::ProcessDelayedMessages(); |
| 3017 } | 3016 } |
| 3018 | 3017 |
| 3019 } // namespace WebCore | 3018 } // namespace WebCore |
| OLD | NEW |