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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // toString of the DOM constructor itself to change. This is extremely | 147 // toString of the DOM constructor itself to change. This is extremely |
148 // obscure and unlikely to be a problem. | 148 // obscure and unlikely to be a problem. |
149 v8::Handle<v8::Value> value = info.Callee()->Get(v8AtomicString(info.GetIsol
ate(), "toString")); | 149 v8::Handle<v8::Value> value = info.Callee()->Get(v8AtomicString(info.GetIsol
ate(), "toString")); |
150 if (!value->IsFunction()) { | 150 if (!value->IsFunction()) { |
151 v8SetReturnValue(info, v8::String::Empty(info.GetIsolate())); | 151 v8SetReturnValue(info, v8::String::Empty(info.GetIsolate())); |
152 return; | 152 return; |
153 } | 153 } |
154 v8SetReturnValue(info, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), info.This(), 0, 0, v8::Isolate::GetCurrent())); | 154 v8SetReturnValue(info, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), info.This(), 0, 0, v8::Isolate::GetCurrent())); |
155 } | 155 } |
156 | 156 |
| 157 v8::Handle<v8::Value> V8PerIsolateData::compiledBlinkInJavaScript(String classNa
me) |
| 158 { |
| 159 HashMap<String, UnsafePersistent<v8::Value> >::iterator it = m_compiledBlink
InJavaScript.find(className); |
| 160 if (it != m_compiledBlinkInJavaScript.end()) |
| 161 return it->value.newLocal(m_isolate); |
| 162 return v8::Handle<v8::Value>(); |
| 163 } |
| 164 |
| 165 void V8PerIsolateData::setCompiledBlinkInJavaScript(String className, v8::Handle
<v8::Value> compiledObject) |
| 166 { |
| 167 m_compiledBlinkInJavaScript.set(className, UnsafePersistent<v8::Value>(m_iso
late, compiledObject)); |
| 168 } |
| 169 |
157 } // namespace WebCore | 170 } // namespace WebCore |
OLD | NEW |