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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 if (!V8CallBoolean(prototype_object->SetPrototype( | 152 if (!V8CallBoolean(prototype_object->SetPrototype( |
153 current_context, error_prototype_.NewLocal(isolate_)))) { | 153 current_context, error_prototype_.NewLocal(isolate_)))) { |
154 return v8::Local<v8::Function>(); | 154 return v8::Local<v8::Function>(); |
155 } | 155 } |
156 } | 156 } |
157 } | 157 } |
158 | 158 |
159 // Origin Trials | 159 // Origin Trials |
160 InstallConditionalFeatures(type, ScriptState::From(current_context), | 160 InstallConditionalFeatures(type, ScriptState::From(current_context), |
161 prototype_object, interface_object); | 161 prototype_object, interface_object); |
162 | |
163 constructor_map_.Set(type, interface_object); | 162 constructor_map_.Set(type, interface_object); |
164 | |
165 return interface_object; | 163 return interface_object; |
166 } | 164 } |
167 | 165 |
168 v8::Local<v8::Object> V8PerContextData::PrototypeForType( | 166 v8::Local<v8::Object> V8PerContextData::PrototypeForType( |
169 const WrapperTypeInfo* type) { | 167 const WrapperTypeInfo* type) { |
170 v8::Local<v8::Object> constructor = ConstructorForType(type); | 168 v8::Local<v8::Object> constructor = ConstructorForType(type); |
171 if (constructor.IsEmpty()) | 169 if (constructor.IsEmpty()) |
172 return v8::Local<v8::Object>(); | 170 return v8::Local<v8::Object>(); |
173 v8::Local<v8::Value> prototype_value; | 171 v8::Local<v8::Value> prototype_value; |
174 if (!constructor->Get(GetContext(), V8String(isolate_, "prototype")) | 172 if (!constructor->Get(GetContext(), V8String(isolate_, "prototype")) |
(...skipping 28 matching lines...) Expand all Loading... |
203 | 201 |
204 void V8PerContextData::ClearData(const char* key) { | 202 void V8PerContextData::ClearData(const char* key) { |
205 data_map_.erase(key); | 203 data_map_.erase(key); |
206 } | 204 } |
207 | 205 |
208 V8PerContextData::Data* V8PerContextData::GetData(const char* key) { | 206 V8PerContextData::Data* V8PerContextData::GetData(const char* key) { |
209 return data_map_.at(key); | 207 return data_map_.at(key); |
210 } | 208 } |
211 | 209 |
212 } // namespace blink | 210 } // namespace blink |
OLD | NEW |