| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.sdk.internal.wip; | 5 package org.chromium.sdk.internal.wip; |
| 6 | 6 |
| 7 import java.util.ArrayList; | 7 import java.util.ArrayList; |
| 8 import java.util.Arrays; | 8 import java.util.Arrays; |
| 9 import java.util.Collection; | 9 import java.util.Collection; |
| 10 import java.util.Collections; | 10 import java.util.Collections; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } else { | 162 } else { |
| 163 properties.add(property); | 163 properties.add(property); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 if (internalPropertyList != null) { | 167 if (internalPropertyList != null) { |
| 168 for (InternalPropertyDescriptorValue propertyDescriptor : internalProper
tyList) { | 168 for (InternalPropertyDescriptorValue propertyDescriptor : internalProper
tyList) { |
| 169 String name = propertyDescriptor.name(); | 169 String name = propertyDescriptor.name(); |
| 170 | 170 |
| 171 JsVariable variable = | 171 JsVariable variable = |
| 172 valueBuilder.createVariable(propertyDescriptor.value(), name, null
); | 172 valueBuilder.createVariable(propertyDescriptor.value(), name); |
| 173 internalProperties.add(variable); | 173 internalProperties.add(variable); |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 | 176 |
| 177 final ObjectProperties result = new ObjectProperties() { | 177 final ObjectProperties result = new ObjectProperties() { |
| 178 private volatile Map<String, JsVariable> propertyMap = null; | 178 private volatile Map<String, JsVariable> propertyMap = null; |
| 179 | 179 |
| 180 @Override | 180 @Override |
| 181 public List<? extends JsObjectProperty> properties() { | 181 public List<? extends JsObjectProperty> properties() { |
| 182 return properties; | 182 return properties; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 return (WipValueLoader) mapping; | 366 return (WipValueLoader) mapping; |
| 367 } catch (ClassCastException e) { | 367 } catch (ClassCastException e) { |
| 368 throw new IllegalArgumentException("Incorrect evaluate context argument",
e); | 368 throw new IllegalArgumentException("Incorrect evaluate context argument",
e); |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 // List is too short to use HashSet. | 372 // List is too short to use HashSet. |
| 373 private static final Collection<String> INTERNAL_PROPERTY_NAME = | 373 private static final Collection<String> INTERNAL_PROPERTY_NAME = |
| 374 Arrays.asList("__proto__"); | 374 Arrays.asList("__proto__"); |
| 375 } | 375 } |
| OLD | NEW |