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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 void ScriptController::gcProtectJSWrapper(void* dom_object) | 100 void ScriptController::gcProtectJSWrapper(void* dom_object) |
101 { | 101 { |
102 V8Proxy::GCProtect(static_cast<Peerable*>(dom_object)); | 102 V8Proxy::GCProtect(static_cast<Peerable*>(dom_object)); |
103 } | 103 } |
104 | 104 |
105 void ScriptController::gcUnprotectJSWrapper(void* dom_object) | 105 void ScriptController::gcUnprotectJSWrapper(void* dom_object) |
106 { | 106 { |
107 V8Proxy::GCUnprotect(static_cast<Peerable*>(dom_object)); | 107 V8Proxy::GCUnprotect(static_cast<Peerable*>(dom_object)); |
108 } | 108 } |
109 | 109 |
110 JSException ScriptController::NoException() | |
111 { | |
112 return v8::Local<v8::Value>(); | |
113 } | |
114 | |
115 bool ScriptController::IsException(JSException exception) | |
116 { | |
117 return !exception.IsEmpty(); | |
118 } | |
119 | |
120 void ScriptController::pauseTimeouts(OwnPtr<PausedTimeouts>& result) | 110 void ScriptController::pauseTimeouts(OwnPtr<PausedTimeouts>& result) |
121 { | 111 { |
122 DOMWindow* window = m_frame->domWindow(); | 112 DOMWindow* window = m_frame->domWindow(); |
123 if (!window) { | 113 if (!window) { |
124 result.clear(); | 114 result.clear(); |
125 return; | 115 return; |
126 } | 116 } |
127 window->pauseTimeouts(result); | 117 window->pauseTimeouts(result); |
128 } | 118 } |
129 | 119 |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 v8::Persistent<v8::Object> handle = | 579 v8::Persistent<v8::Object> handle = |
590 v8::Persistent<v8::Object>::New(instance); | 580 v8::Persistent<v8::Object>::New(instance); |
591 m_instance = handle; | 581 m_instance = handle; |
592 #ifndef NDEBUG | 582 #ifndef NDEBUG |
593 V8Proxy::RegisterGlobalHandle(JSINSTANCE, this, handle); | 583 V8Proxy::RegisterGlobalHandle(JSINSTANCE, this, handle); |
594 #endif | 584 #endif |
595 return *this; | 585 return *this; |
596 } | 586 } |
597 | 587 |
598 } // namespace WebCpre | 588 } // namespace WebCpre |
OLD | NEW |