| 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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 SetDOMWrapper(window_peer, | 1856 SetDOMWrapper(window_peer, |
| 1857 V8ClassIndex::ToInt(V8ClassIndex::DOMWINDOW), | 1857 V8ClassIndex::ToInt(V8ClassIndex::DOMWINDOW), |
| 1858 window); | 1858 window); |
| 1859 // Insert the window instance as the prototype of the shadow object. | 1859 // Insert the window instance as the prototype of the shadow object. |
| 1860 v8::Handle<v8::Object> v8_global = context->Global(); | 1860 v8::Handle<v8::Object> v8_global = context->Global(); |
| 1861 v8_global->Set(v8::String::New("__proto__"), window_peer); | 1861 v8_global->Set(v8::String::New("__proto__"), window_peer); |
| 1862 | 1862 |
| 1863 // Setup security origin and security token | 1863 // Setup security origin and security token |
| 1864 GenerateSecurityToken(context); | 1864 GenerateSecurityToken(context); |
| 1865 | 1865 |
| 1866 V8Proxy::retrieveFrame(context)->loader()->dispatchWindowObjectAvailable(); | |
| 1867 | |
| 1868 if (ScriptController::RecordPlaybackMode()) { | 1866 if (ScriptController::RecordPlaybackMode()) { |
| 1869 // Inject code which overrides a few common JS functions for implementing | 1867 // Inject code which overrides a few common JS functions for implementing |
| 1870 // randomness. In order to implement effective record & playback of | 1868 // randomness. In order to implement effective record & playback of |
| 1871 // websites, it is important that the URLs not change. Many popular web | 1869 // websites, it is important that the URLs not change. Many popular web |
| 1872 // based apps use randomness in URLs to unique-ify urls for proxies. | 1870 // based apps use randomness in URLs to unique-ify urls for proxies. |
| 1873 // Unfortunately, this breaks playback. | 1871 // Unfortunately, this breaks playback. |
| 1874 // To work around this, we take the two most common client-side randomness | 1872 // To work around this, we take the two most common client-side randomness |
| 1875 // generators and make them constant. They really need to be constant | 1873 // generators and make them constant. They really need to be constant |
| 1876 // (rather than a constant seed followed by constant change) | 1874 // (rather than a constant seed followed by constant change) |
| 1877 // because the playback mode wants flexibility in how it plays them back | 1875 // because the playback mode wants flexibility in how it plays them back |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2864 v8::Handle<v8::Object> global = context->Global(); | 2862 v8::Handle<v8::Object> global = context->Global(); |
| 2865 global->Set(v8::String::New(name), instance); | 2863 global->Set(v8::String::New(name), instance); |
| 2866 } | 2864 } |
| 2867 | 2865 |
| 2868 void V8Proxy::ProcessConsoleMessages() | 2866 void V8Proxy::ProcessConsoleMessages() |
| 2869 { | 2867 { |
| 2870 ConsoleMessageManager::ProcessDelayedMessages(); | 2868 ConsoleMessageManager::ProcessDelayedMessages(); |
| 2871 } | 2869 } |
| 2872 | 2870 |
| 2873 } // namespace WebCore | 2871 } // namespace WebCore |
| OLD | NEW |