Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: src/runtime.cc

Issue 11368142: Turn message property of the error object into a data property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 13083 matching lines...) Expand 10 before | Expand all | Expand 10 after
13094 #ifdef VERIFY_HEAP 13094 #ifdef VERIFY_HEAP
13095 if (FLAG_verify_heap) { 13095 if (FLAG_verify_heap) {
13096 cache_handle->JSFunctionResultCacheVerify(); 13096 cache_handle->JSFunctionResultCacheVerify();
13097 } 13097 }
13098 #endif 13098 #endif
13099 13099
13100 return *value; 13100 return *value;
13101 } 13101 }
13102 13102
13103 13103
13104 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewMessageObject) {
13105 HandleScope scope(isolate);
13106 CONVERT_ARG_HANDLE_CHECKED(String, type, 0);
13107 CONVERT_ARG_HANDLE_CHECKED(JSArray, arguments, 1);
13108 return *isolate->factory()->NewJSMessageObject(
13109 type,
13110 arguments,
13111 0,
13112 0,
13113 isolate->factory()->undefined_value(),
13114 isolate->factory()->undefined_value(),
13115 isolate->factory()->undefined_value());
13116 }
13117
13118
13119 RUNTIME_FUNCTION(MaybeObject*, Runtime_MessageGetType) {
13120 CONVERT_ARG_CHECKED(JSMessageObject, message, 0);
13121 return message->type();
13122 }
13123
13124
13125 RUNTIME_FUNCTION(MaybeObject*, Runtime_MessageGetArguments) {
13126 CONVERT_ARG_CHECKED(JSMessageObject, message, 0);
13127 return message->arguments();
13128 }
13129
13130
13131 RUNTIME_FUNCTION(MaybeObject*, Runtime_MessageGetStartPosition) { 13104 RUNTIME_FUNCTION(MaybeObject*, Runtime_MessageGetStartPosition) {
13132 CONVERT_ARG_CHECKED(JSMessageObject, message, 0); 13105 CONVERT_ARG_CHECKED(JSMessageObject, message, 0);
13133 return Smi::FromInt(message->start_position()); 13106 return Smi::FromInt(message->start_position());
13134 } 13107 }
13135 13108
13136 13109
13137 RUNTIME_FUNCTION(MaybeObject*, Runtime_MessageGetScript) { 13110 RUNTIME_FUNCTION(MaybeObject*, Runtime_MessageGetScript) {
13138 CONVERT_ARG_CHECKED(JSMessageObject, message, 0); 13111 CONVERT_ARG_CHECKED(JSMessageObject, message, 0);
13139 return message->script(); 13112 return message->script();
13140 } 13113 }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
13391 // Handle last resort GC and make sure to allow future allocations 13364 // Handle last resort GC and make sure to allow future allocations
13392 // to grow the heap without causing GCs (if possible). 13365 // to grow the heap without causing GCs (if possible).
13393 isolate->counters()->gc_last_resort_from_js()->Increment(); 13366 isolate->counters()->gc_last_resort_from_js()->Increment();
13394 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13367 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13395 "Runtime::PerformGC"); 13368 "Runtime::PerformGC");
13396 } 13369 }
13397 } 13370 }
13398 13371
13399 13372
13400 } } // namespace v8::internal 13373 } } // namespace v8::internal
OLDNEW
« src/messages.cc ('K') | « src/runtime.h ('k') | test/mjsunit/error-accessors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698