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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 kV8PrototypeTypeIndex, const_cast<WrapperTypeInfo*>(type)); | 129 kV8PrototypeTypeIndex, const_cast<WrapperTypeInfo*>(type)); |
130 } | 130 } |
131 type->PreparePrototypeAndInterfaceObject(current_context, world, | 131 type->PreparePrototypeAndInterfaceObject(current_context, world, |
132 prototype_object, interface_object, | 132 prototype_object, interface_object, |
133 interface_template); | 133 interface_template); |
134 } | 134 } |
135 | 135 |
136 // Origin Trials | 136 // Origin Trials |
137 InstallConditionalFeatures(type, ScriptState::From(current_context), | 137 InstallConditionalFeatures(type, ScriptState::From(current_context), |
138 prototype_object, interface_object); | 138 prototype_object, interface_object); |
| 139 |
139 constructor_map_.Set(type, interface_object); | 140 constructor_map_.Set(type, interface_object); |
| 141 |
140 return interface_object; | 142 return interface_object; |
141 } | 143 } |
142 | 144 |
143 v8::Local<v8::Object> V8PerContextData::PrototypeForType( | 145 v8::Local<v8::Object> V8PerContextData::PrototypeForType( |
144 const WrapperTypeInfo* type) { | 146 const WrapperTypeInfo* type) { |
145 v8::Local<v8::Object> constructor = ConstructorForType(type); | 147 v8::Local<v8::Object> constructor = ConstructorForType(type); |
146 if (constructor.IsEmpty()) | 148 if (constructor.IsEmpty()) |
147 return v8::Local<v8::Object>(); | 149 return v8::Local<v8::Object>(); |
148 v8::Local<v8::Value> prototype_value; | 150 v8::Local<v8::Value> prototype_value; |
149 if (!constructor->Get(GetContext(), V8String(isolate_, "prototype")) | 151 if (!constructor->Get(GetContext(), V8String(isolate_, "prototype")) |
(...skipping 28 matching lines...) Expand all Loading... |
178 | 180 |
179 void V8PerContextData::ClearData(const char* key) { | 181 void V8PerContextData::ClearData(const char* key) { |
180 data_map_.erase(key); | 182 data_map_.erase(key); |
181 } | 183 } |
182 | 184 |
183 V8PerContextData::Data* V8PerContextData::GetData(const char* key) { | 185 V8PerContextData::Data* V8PerContextData::GetData(const char* key) { |
184 return data_map_.at(key); | 186 return data_map_.at(key); |
185 } | 187 } |
186 | 188 |
187 } // namespace blink | 189 } // namespace blink |
OLD | NEW |