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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 V8PerContextData::V8PerContextData(v8::Handle<v8::Context> context) | 43 V8PerContextData::V8PerContextData(v8::Handle<v8::Context> context) |
44 : m_wrapperBoilerplates(context->GetIsolate()) | 44 : m_wrapperBoilerplates(context->GetIsolate()) |
45 , m_constructorMap(context->GetIsolate()) | 45 , m_constructorMap(context->GetIsolate()) |
46 , m_isolate(context->GetIsolate()) | 46 , m_isolate(context->GetIsolate()) |
47 , m_contextHolder(adoptPtr(new gin::ContextHolder(context->GetIsolate()))) | 47 , m_contextHolder(adoptPtr(new gin::ContextHolder(context->GetIsolate()))) |
48 , m_context(m_isolate, context) | 48 , m_context(m_isolate, context) |
49 , m_customElementBindings(adoptPtr(new CustomElementBindingMap())) | 49 , m_customElementBindings(adoptPtr(new CustomElementBindingMap())) |
| 50 , m_activityLogger(0) |
50 { | 51 { |
51 m_contextHolder->SetContext(context); | 52 m_contextHolder->SetContext(context); |
52 | 53 |
53 v8::Context::Scope contextScope(context); | 54 v8::Context::Scope contextScope(context); |
54 ASSERT(m_errorPrototype.isEmpty()); | 55 ASSERT(m_errorPrototype.isEmpty()); |
55 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global
()->Get(v8AtomicString(m_isolate, "Error"))); | 56 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global
()->Get(v8AtomicString(m_isolate, "Error"))); |
56 ASSERT(!object.IsEmpty()); | 57 ASSERT(!object.IsEmpty()); |
57 v8::Handle<v8::Value> prototypeValue = object->Get(v8AtomicString(m_isolate,
"prototype")); | 58 v8::Handle<v8::Value> prototypeValue = object->Get(v8AtomicString(m_isolate,
"prototype")); |
58 ASSERT(!prototypeValue.IsEmpty()); | 59 ASSERT(!prototypeValue.IsEmpty()); |
59 m_errorPrototype.set(m_isolate, prototypeValue); | 60 m_errorPrototype.set(m_isolate, prototypeValue); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 if (!data->IsString()) | 197 if (!data->IsString()) |
197 return -1; | 198 return -1; |
198 v8::String::Utf8Value utf8(data); | 199 v8::String::Utf8Value utf8(data); |
199 char* comma = strnstr(*utf8, ",", utf8.length()); | 200 char* comma = strnstr(*utf8, ",", utf8.length()); |
200 if (!comma) | 201 if (!comma) |
201 return -1; | 202 return -1; |
202 return atoi(comma + 1); | 203 return atoi(comma + 1); |
203 } | 204 } |
204 | 205 |
205 } // namespace WebCore | 206 } // namespace WebCore |
OLD | NEW |