Merge lp:~marcustomlinson/v8-cpp/lp-1473163 into lp:v8-cpp

Proposed by Marcus Tomlinson
Status: Merged
Merged at revision: 19
Proposed branch: lp:~marcustomlinson/v8-cpp/lp-1473163
Merge into: lp:v8-cpp
Diff against target: 107 lines (+16/-16)
4 files modified
src/internal/require.h (+12/-12)
src/run.h (+2/-2)
tests/run/scripts/test.js (+1/-1)
tests/run/scripts/test2.js (+1/-1)
To merge this branch: bzr merge lp:~marcustomlinson/v8-cpp/lp-1473163
Reviewer Review Type Date Requested Status
Marcus Tomlinson Pending
Review via email: mp+264835@code.launchpad.net

Commit message

Revert some changes to fix link errors

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/internal/require.h'
2--- src/internal/require.h 2015-07-08 09:29:21 +0000
3+++ src/internal/require.h 2015-07-15 13:20:57 +0000
4@@ -28,8 +28,8 @@
5 {
6
7 using ModuleInitFunc = void(v8::Handle<v8::Object> exports);
8-ModuleInitFunc* node_init_func_;
9-std::shared_ptr<std::string> v8cpp_script_path_;
10+///!ModuleInitFunc* node_init_func_;
11+///!std::shared_ptr<std::string> v8cpp_script_path_;
12
13 struct NodeModule
14 {
15@@ -48,7 +48,7 @@
16 // For now we only know that version 14 works here
17 if (mp->nm_version == 14)
18 {
19- node_init_func_ = mp->nm_register_func;
20+ ///!node_init_func_ = mp->nm_register_func;
21 }
22 else
23 {
24@@ -92,8 +92,8 @@
25
26 inline v8::Local<v8::Object> require(std::string const& module_path)
27 {
28- node_init_func_ = nullptr;
29- std::string script_path = v8cpp_script_path_ ? *v8cpp_script_path_ : "";
30+ ///!node_init_func_ = nullptr;
31+ std::string script_path; ///! = v8cpp_script_path_ ? *v8cpp_script_path_ : "";
32
33 // Try append ".node" to module_path
34 std::string suffixed_module_path = script_path + module_path + ".node";
35@@ -117,12 +117,12 @@
36
37 v8::Local<v8::Object> exports = v8::Object::New(v8::Isolate::GetCurrent());
38
39- if (node_init_func_)
40- {
41- node_init_func_(exports);
42- }
43- else
44- {
45+///! if (node_init_func_)
46+///! {
47+///! node_init_func_(exports);
48+///! }
49+///! else
50+///! {
51 auto v8cpp_init_func = (ModuleInitFunc*)dlsym(module, "init_module");
52 if (!v8cpp_init_func)
53 {
54@@ -130,7 +130,7 @@
55 }
56
57 v8cpp_init_func(exports);
58- }
59+///! }
60
61 return exports;
62 }
63
64=== modified file 'src/run.h'
65--- src/run.h 2015-07-08 09:29:21 +0000
66+++ src/run.h 2015-07-15 13:20:57 +0000
67@@ -46,7 +46,7 @@
68 isolate->SetData(0, nullptr);
69 isolate->Dispose();
70
71- internal::v8cpp_script_path_.reset();
72+ ///!internal::v8cpp_script_path_.reset();
73 });
74
75 // Create an isolate scope.
76@@ -70,7 +70,7 @@
77 std::size_t found = filename.find_last_of("/");
78 if (found != std::string::npos)
79 {
80- internal::v8cpp_script_path_ = std::make_shared<std::string>(filename.substr(0, found) + "/");
81+ ///!internal::v8cpp_script_path_ = std::make_shared<std::string>(filename.substr(0, found) + "/");
82 }
83
84 module.add_function("require", &internal::require);
85
86=== modified file 'tests/run/scripts/test.js'
87--- tests/run/scripts/test.js 2015-07-08 06:20:26 +0000
88+++ tests/run/scripts/test.js 2015-07-15 13:20:57 +0000
89@@ -16,6 +16,6 @@
90 * Authored by: Marcus Tomlinson <marcus.tomlinson@canonical.com>
91 */
92
93-var module = require("../test-run-module");
94+var module = require("./test-run-module"); ///! ../
95 var test_object = new module.TestClass(1, 2);
96 test_object;
97
98=== modified file 'tests/run/scripts/test2.js'
99--- tests/run/scripts/test2.js 2015-07-08 06:20:26 +0000
100+++ tests/run/scripts/test2.js 2015-07-15 13:20:57 +0000
101@@ -21,5 +21,5 @@
102 console.log(true, " > ", false);
103 console.log("hello", " ", "there");
104
105-var module = require("../test-run-module");
106+var module = require("./test-run-module"); ///! ../
107 new module.TestClass(3, 4);

Subscribers

People subscribed via source and target branches

to all changes: