// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <v8.h>
+#include <include/v8.h>
-#include <v8-debug.h>
+#include <include/libplatform/libplatform.h>
+#include <include/v8-debug.h>
#include <fcntl.h>
-#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
/**
* This sample program should demonstrate certain aspects of debugging
int main(int argc, char* argv[]) {
v8::V8::InitializeICU();
+ v8::Platform* platform = v8::platform::CreateDefaultPlatform();
+ v8::V8::InitializePlatform(platform);
int result = RunMain(argc, argv);
v8::V8::Dispose();
+ v8::V8::ShutdownPlatform();
+ delete platform;
return result;
}
printf("%s\n", exception_string);
} else {
// Print (filename):(line number): (message).
- v8::String::Utf8Value filename(message->GetScriptResourceName());
+ v8::String::Utf8Value filename(message->GetScriptOrigin().ResourceName());
const char* filename_string = ToCString(filename);
int linenum = message->GetLineNumber();
printf("%s:%i: %s\n", filename_string, linenum, exception_string);