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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 ASSERT_NOT_REACHED(); | 59 ASSERT_NOT_REACHED(); |
60 quarantinedObject = ScriptObject(); | 60 quarantinedObject = ScriptObject(); |
61 return false; | 61 return false; |
62 } | 62 } |
63 | 63 |
64 bool getQuarantinedScriptObject(Frame* frame, Storage* storage, ScriptObject& qu
arantinedObject) | 64 bool getQuarantinedScriptObject(Frame* frame, Storage* storage, ScriptObject& qu
arantinedObject) |
65 { | 65 { |
66 ASSERT(frame); | 66 ASSERT(frame); |
67 ASSERT(storage); | 67 ASSERT(storage); |
68 | 68 |
69 // FIXME: Implement when DOM Storage V8 bindings are enabled | 69 #if ENABLE(DOM_STORAGE) |
| 70 v8::Handle<v8::Value> v8Storage = V8DOMWrapper::convertToV8Object(V8ClassInd
ex::STORAGE, storage); |
| 71 quarantinedObject = ScriptObject(v8::Local<v8::Object>(v8::Object::Cast(*v8S
torage))); |
| 72 return true; |
| 73 #else |
70 ASSERT_NOT_REACHED(); | 74 ASSERT_NOT_REACHED(); |
71 quarantinedObject = ScriptObject(); | 75 quarantinedObject = ScriptObject(); |
72 return true; | 76 return false; |
| 77 #endif |
73 } | 78 } |
74 | 79 |
75 bool getQuarantinedScriptObject(Node* node, ScriptObject& quarantinedObject) | 80 bool getQuarantinedScriptObject(Node* node, ScriptObject& quarantinedObject) |
76 { | 81 { |
77 ASSERT(node); | 82 ASSERT(node); |
78 | 83 |
79 v8::HandleScope handleScope; | 84 v8::HandleScope handleScope; |
80 v8::Local<v8::Context> context = V8Proxy::context(node->document()->page()->
mainFrame()); | 85 v8::Local<v8::Context> context = V8Proxy::context(node->document()->page()->
mainFrame()); |
81 v8::Context::Scope scope(context); | 86 v8::Context::Scope scope(context); |
82 | 87 |
(...skipping 12 matching lines...) Expand all Loading... |
95 v8::Context::Scope scope(context); | 100 v8::Context::Scope scope(context); |
96 | 101 |
97 v8::Handle<v8::Value> v8DomWindow = V8DOMWrapper::convertToV8Object(V8ClassI
ndex::DOMWINDOW, domWindow); | 102 v8::Handle<v8::Value> v8DomWindow = V8DOMWrapper::convertToV8Object(V8ClassI
ndex::DOMWINDOW, domWindow); |
98 quarantinedObject = ScriptObject(v8::Local<v8::Object>(v8::Object::Cast(*v8D
omWindow))); | 103 quarantinedObject = ScriptObject(v8::Local<v8::Object>(v8::Object::Cast(*v8D
omWindow))); |
99 | 104 |
100 return true; | 105 return true; |
101 } | 106 } |
102 | 107 |
103 | 108 |
104 } // namespace WebCore | 109 } // namespace WebCore |
OLD | NEW |