| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // | 69 // |
| 70 // All methods and attributes defined on the Window interface are exposed via | 70 // All methods and attributes defined on the Window interface are exposed via |
| 71 // the inner global object. Global variables defined by script running in the | 71 // the inner global object. Global variables defined by script running in the |
| 72 // Document also live on the inner global object. | 72 // Document also live on the inner global object. |
| 73 // | 73 // |
| 74 // ====== Outer Global Proxy ==== | 74 // ====== Outer Global Proxy ==== |
| 75 // The outer global proxy is reused across navigations. It implements the | 75 // The outer global proxy is reused across navigations. It implements the |
| 76 // security checks for same-origin/cross-origin access to the Window interface. | 76 // security checks for same-origin/cross-origin access to the Window interface. |
| 77 // When the check passes (i.e. the access is same-origin), the access is | 77 // When the check passes (i.e. the access is same-origin), the access is |
| 78 // forwarded to the inner global object of the active Document in this | 78 // forwarded to the inner global object of the active Document in this |
| 79 // WindowProxy's Frame). | 79 // WindowProxy's Frame. |
| 80 // | 80 // |
| 81 // When the security check fails, the access is delegated to the outer global | 81 // When the security check fails, the access is delegated to the outer global |
| 82 // proxy's cross-origin interceptors. The cross-origin interceptors may choose | 82 // proxy's cross-origin interceptors. The cross-origin interceptors may choose |
| 83 // to return a value (if the property is exposed cross-origin) or throw an | 83 // to return a value (if the property is exposed cross-origin) or throw an |
| 84 // exception otherwise. | 84 // exception otherwise. |
| 85 // | 85 // |
| 86 // Note that the cross-origin interceptors are only used for cross-origin | 86 // Note that the cross-origin interceptors are only used for cross-origin |
| 87 // accesses: a same-origin access to a method that is available cross-origin, | 87 // accesses: a same-origin access to a method that is available cross-origin, |
| 88 // such as Window.postMessage, will be delegated to the inner global object. | 88 // such as Window.postMessage, will be delegated to the inner global object. |
| 89 // | 89 // |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // reference to the global proxy makes the entire context alive). In order to | 255 // reference to the global proxy makes the entire context alive). In order to |
| 256 // discard the v8::Context, |global_proxy_| needs to be a weak reference or | 256 // discard the v8::Context, |global_proxy_| needs to be a weak reference or |
| 257 // to be destroyed. | 257 // to be destroyed. |
| 258 ScopedPersistent<v8::Object> global_proxy_; | 258 ScopedPersistent<v8::Object> global_proxy_; |
| 259 Lifecycle lifecycle_; | 259 Lifecycle lifecycle_; |
| 260 }; | 260 }; |
| 261 | 261 |
| 262 } // namespace blink | 262 } // namespace blink |
| 263 | 263 |
| 264 #endif // WindowProxy_h | 264 #endif // WindowProxy_h |
| OLD | NEW |