| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 *value, | 275 *value, |
| 276 attributes, | 276 attributes, |
| 277 strict_mode), | 277 strict_mode), |
| 278 Object); | 278 Object); |
| 279 } | 279 } |
| 280 | 280 |
| 281 | 281 |
| 282 Handle<Object> GetProperty(Handle<JSReceiver> obj, | 282 Handle<Object> GetProperty(Handle<JSReceiver> obj, |
| 283 const char* name) { | 283 const char* name) { |
| 284 Isolate* isolate = obj->GetIsolate(); | 284 Isolate* isolate = obj->GetIsolate(); |
| 285 Handle<String> str = isolate->factory()->LookupAsciiSymbol(name); | 285 Handle<String> str = isolate->factory()->LookupUtf8Symbol(name); |
| 286 CALL_HEAP_FUNCTION(isolate, obj->GetProperty(*str), Object); | 286 CALL_HEAP_FUNCTION(isolate, obj->GetProperty(*str), Object); |
| 287 } | 287 } |
| 288 | 288 |
| 289 | 289 |
| 290 Handle<Object> GetProperty(Handle<Object> obj, | 290 Handle<Object> GetProperty(Handle<Object> obj, |
| 291 Handle<Object> key) { | 291 Handle<Object> key) { |
| 292 Isolate* isolate = Isolate::Current(); | 292 Isolate* isolate = Isolate::Current(); |
| 293 CALL_HEAP_FUNCTION(isolate, | 293 CALL_HEAP_FUNCTION(isolate, |
| 294 Runtime::GetObjectProperty(isolate, obj, key), Object); | 294 Runtime::GetObjectProperty(isolate, obj, key), Object); |
| 295 } | 295 } |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 #endif | 589 #endif |
| 590 } | 590 } |
| 591 } | 591 } |
| 592 return result; | 592 return result; |
| 593 } | 593 } |
| 594 | 594 |
| 595 | 595 |
| 596 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) { | 596 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) { |
| 597 Isolate* isolate = script->GetIsolate(); | 597 Isolate* isolate = script->GetIsolate(); |
| 598 Handle<String> name_or_source_url_key = | 598 Handle<String> name_or_source_url_key = |
| 599 isolate->factory()->LookupAsciiSymbol("nameOrSourceURL"); | 599 isolate->factory()->LookupOneByteSymbol( |
| 600 STATIC_ASCII_VECTOR("nameOrSourceURL")); |
| 600 Handle<JSValue> script_wrapper = GetScriptWrapper(script); | 601 Handle<JSValue> script_wrapper = GetScriptWrapper(script); |
| 601 Handle<Object> property = GetProperty(script_wrapper, | 602 Handle<Object> property = GetProperty(script_wrapper, |
| 602 name_or_source_url_key); | 603 name_or_source_url_key); |
| 603 ASSERT(property->IsJSFunction()); | 604 ASSERT(property->IsJSFunction()); |
| 604 Handle<JSFunction> method = Handle<JSFunction>::cast(property); | 605 Handle<JSFunction> method = Handle<JSFunction>::cast(property); |
| 605 bool caught_exception; | 606 bool caught_exception; |
| 606 Handle<Object> result = Execution::TryCall(method, script_wrapper, 0, | 607 Handle<Object> result = Execution::TryCall(method, script_wrapper, 0, |
| 607 NULL, &caught_exception); | 608 NULL, &caught_exception); |
| 608 if (caught_exception) { | 609 if (caught_exception) { |
| 609 result = isolate->factory()->undefined_value(); | 610 result = isolate->factory()->undefined_value(); |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 data->next = prev_next_; | 1078 data->next = prev_next_; |
| 1078 data->limit = prev_limit_; | 1079 data->limit = prev_limit_; |
| 1079 #ifdef DEBUG | 1080 #ifdef DEBUG |
| 1080 handles_detached_ = true; | 1081 handles_detached_ = true; |
| 1081 #endif | 1082 #endif |
| 1082 return deferred; | 1083 return deferred; |
| 1083 } | 1084 } |
| 1084 | 1085 |
| 1085 | 1086 |
| 1086 } } // namespace v8::internal | 1087 } } // namespace v8::internal |
| OLD | NEW |