| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 disposeMapWithUnsafePersistentValues(&m_wrapperBoilerplates); | 56 disposeMapWithUnsafePersistentValues(&m_wrapperBoilerplates); |
| 57 disposeMapWithUnsafePersistentValues(&m_constructorMap); | 57 disposeMapWithUnsafePersistentValues(&m_constructorMap); |
| 58 m_customElementBindings.clear(); | 58 m_customElementBindings.clear(); |
| 59 | 59 |
| 60 m_context.Reset(); | 60 m_context.Reset(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 #define V8_STORE_PRIMORDIAL(name, Name) \ | 63 #define V8_STORE_PRIMORDIAL(name, Name) \ |
| 64 { \ | 64 { \ |
| 65 ASSERT(m_##name##Prototype.isEmpty()); \ | 65 ASSERT(m_##name##Prototype.isEmpty()); \ |
| 66 v8::Handle<v8::String> symbol = v8::String::NewFromUtf8(m_isolate, #Name, v8
::String::kInternalizedString); \ | 66 v8::Handle<v8::String> symbol = v8AtomicString(m_isolate, #Name); \ |
| 67 if (symbol.IsEmpty()) \ | 67 if (symbol.IsEmpty()) \ |
| 68 return false; \ | 68 return false; \ |
| 69 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(v8::Local<v8::C
ontext>::New(m_isolate, m_context)->Global()->Get(symbol)); \ | 69 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(v8::Local<v8::C
ontext>::New(m_isolate, m_context)->Global()->Get(symbol)); \ |
| 70 if (object.IsEmpty()) \ | 70 if (object.IsEmpty()) \ |
| 71 return false; \ | 71 return false; \ |
| 72 v8::Handle<v8::Value> prototypeValue = object->Get(prototypeString); \ | 72 v8::Handle<v8::Value> prototypeValue = object->Get(prototypeString); \ |
| 73 if (prototypeValue.IsEmpty()) \ | 73 if (prototypeValue.IsEmpty()) \ |
| 74 return false; \ | 74 return false; \ |
| 75 m_##name##Prototype.set(m_isolate, prototypeValue); \ | 75 m_##name##Prototype.set(m_isolate, prototypeValue); \ |
| 76 } | 76 } |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 if (!data->IsString()) | 214 if (!data->IsString()) |
| 215 return -1; | 215 return -1; |
| 216 v8::String::Utf8Value utf8(data); | 216 v8::String::Utf8Value utf8(data); |
| 217 char* comma = strnstr(*utf8, ",", utf8.length()); | 217 char* comma = strnstr(*utf8, ",", utf8.length()); |
| 218 if (!comma) | 218 if (!comma) |
| 219 return -1; | 219 return -1; |
| 220 return atoi(comma + 1); | 220 return atoi(comma + 1); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace WebCore | 223 } // namespace WebCore |
| OLD | NEW |